forked from cerc-io/stack-orchestrator
Compare commits
49
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18e45af463 | ||
|
|
fd78935fe6 | ||
|
|
4c72acea96 | ||
|
|
bccf711206 | ||
|
|
333797b0c3 | ||
|
|
dc7bc6af31 | ||
|
|
d6bd99252d | ||
|
|
d30e746599 | ||
|
|
73e52c4eed | ||
|
|
e856616be8 | ||
|
|
2da03d7ed1 | ||
|
|
6a0a752e2e | ||
|
|
5afe7a29ae | ||
|
|
a8f4e4cee4 | ||
|
|
45ba1f337f | ||
|
|
0feeab6418 | ||
|
|
4ee745a4db | ||
|
|
8eed5a70a5 | ||
|
|
758ec168bd | ||
|
|
63a94bae0e | ||
|
|
29fc611885 | ||
|
|
1f9131ff5a | ||
|
|
950857fa84 | ||
|
|
54f50aa09e | ||
|
|
a5945c9e59 | ||
|
|
c8b4f89335 | ||
|
|
809889f9f0 | ||
|
|
6595659a7a | ||
|
|
9872ce33bb | ||
|
|
2ff490d121 | ||
|
|
c76195c491 | ||
|
|
831a8cd5f7 | ||
|
|
f0f40cad4a | ||
|
|
f473567bd7 | ||
|
|
3e7037e06f | ||
|
|
c465153cc7 | ||
|
|
b120682d8e | ||
|
|
c9bb0d0ccb | ||
|
|
c94fa3cccf | ||
|
|
55af33e0e8 | ||
|
|
c0f07c2d4f | ||
|
|
7ca7bcc952 | ||
|
|
ee8c8a0c13 | ||
|
|
30ce3deb31 | ||
|
|
a6cf131cd3 | ||
|
|
25b13d7822 | ||
|
|
01500e78b6 | ||
|
|
4ecc98dd46 | ||
|
|
32f8d65bb8 |
@@ -12,7 +12,7 @@ jobs:
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Python"
|
||||
uses: cerc-io/setup-python@v4
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
build_tag=$(./scripts/create_build_tag_file.sh)
|
||||
echo "build-tag=v${build_tag}" >> $GITHUB_OUTPUT
|
||||
- name: "Install Python"
|
||||
uses: cerc-io/setup-python@v4
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
run: |
|
||||
cp ${{ steps.build.outputs.package-file }} ./laconic-so
|
||||
- name: "Create release"
|
||||
uses: cerc-io/action-gh-release@gitea-v1
|
||||
uses: https://gitea.com/cerc-io/action-gh-release@gitea-v2
|
||||
with:
|
||||
tag_name: ${{ steps.build-info.outputs.build-tag }}
|
||||
# On the publish test branch, mark our release as a draft
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Python"
|
||||
uses: cerc-io/setup-python@v4
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Python"
|
||||
uses: cerc-io/setup-python@v4
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
|
||||
+9
-1
@@ -15,7 +15,8 @@
|
||||
|
||||
import os
|
||||
from abc import ABC, abstractmethod
|
||||
from .deploy_system import get_stack_status
|
||||
from app.deploy import get_stack_status
|
||||
from decouple import config
|
||||
|
||||
|
||||
def get_stack(config, stack):
|
||||
@@ -69,3 +70,10 @@ class package_registry_stack(base_stack):
|
||||
|
||||
def get_url(self):
|
||||
return self.url
|
||||
|
||||
|
||||
def get_npm_registry_url():
|
||||
# If an auth token is not defined, we assume the default should be the cerc registry
|
||||
# If an auth token is defined, we assume the local gitea should be used.
|
||||
default_npm_registry_url = "http://gitea.local:3000/api/packages/cerc-io/npm/" if config("CERC_NPM_AUTH_TOKEN", default=None) else "https://git.vdb.to/api/packages/cerc-io/npm/"
|
||||
return config("CERC_NPM_REGISTRY_URL", default=default_npm_registry_url)
|
||||
|
||||
@@ -27,7 +27,8 @@ import subprocess
|
||||
import click
|
||||
import importlib.resources
|
||||
from pathlib import Path
|
||||
from .util import include_exclude_check, get_parsed_stack_config
|
||||
from app.util import include_exclude_check, get_parsed_stack_config
|
||||
from app.base import get_npm_registry_url
|
||||
|
||||
# TODO: find a place for this
|
||||
# epilog="Config provided either in .env or settings.ini or env vars: CERC_REPO_BASE_DIR (defaults to ~/cerc)"
|
||||
@@ -66,7 +67,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||
print('Dev root directory doesn\'t exist, creating')
|
||||
|
||||
# See: https://stackoverflow.com/a/20885799/1701505
|
||||
from . import data
|
||||
from app import data
|
||||
with importlib.resources.open_text(data, "container-image-list.txt") as container_list_file:
|
||||
all_containers = container_list_file.read().splitlines()
|
||||
|
||||
@@ -84,7 +85,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||
|
||||
# TODO: make this configurable
|
||||
container_build_env = {
|
||||
"CERC_NPM_REGISTRY_URL": config("CERC_NPM_REGISTRY_URL", default="http://gitea.local:3000/api/packages/cerc-io/npm/"),
|
||||
"CERC_NPM_REGISTRY_URL": get_npm_registry_url(),
|
||||
"CERC_NPM_AUTH_TOKEN": config("CERC_NPM_AUTH_TOKEN", default=""),
|
||||
"CERC_REPO_BASE_DIR": dev_root_path,
|
||||
"CERC_CONTAINER_BASE_DIR": container_build_dir,
|
||||
|
||||
+3
-3
@@ -25,8 +25,8 @@ from decouple import config
|
||||
import click
|
||||
import importlib.resources
|
||||
from python_on_whales import docker, DockerException
|
||||
from .base import get_stack
|
||||
from .util import include_exclude_check, get_parsed_stack_config
|
||||
from app.base import get_stack
|
||||
from app.util import include_exclude_check, get_parsed_stack_config
|
||||
|
||||
builder_js_image_name = "cerc/builder-js:local"
|
||||
|
||||
@@ -81,7 +81,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||
os.makedirs(build_root_path)
|
||||
|
||||
# See: https://stackoverflow.com/a/20885799/1701505
|
||||
from . import data
|
||||
from app import data
|
||||
with importlib.resources.open_text(data, "npm-package-list.txt") as package_list_file:
|
||||
all_packages = package_list_file.read().splitlines()
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ services:
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
environment:
|
||||
CERC_REMOTE_DEBUG: "true"
|
||||
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
||||
CERC_RUN_STATEDIFF: ${CERC_RUN_STATEDIFF:-detect}
|
||||
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
services:
|
||||
graph-node:
|
||||
image: cerc/graph-node:local
|
||||
environment:
|
||||
ipfs: ipfs:5001
|
||||
postgres_host: db
|
||||
postgres_port: 5432
|
||||
postgres_user: graph-node
|
||||
postgres_pass: password
|
||||
postgres_db: graph-node
|
||||
ports:
|
||||
- "8000"
|
||||
- "8001"
|
||||
- "8020"
|
||||
- "8030"
|
||||
ipfs:
|
||||
image: ipfs/kubo:master-2023-02-20-714a968
|
||||
volumes:
|
||||
- ipfs-import:/import
|
||||
- ipfs-data:/data/ipfs
|
||||
ports:
|
||||
- "8080"
|
||||
- "4001"
|
||||
- "5001"
|
||||
db:
|
||||
image: postgres:14-alpine
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: "graph-node"
|
||||
POSTGRES_DB: "graph-node"
|
||||
POSTGRES_PASSWORD: "password"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
ports:
|
||||
- "5432"
|
||||
|
||||
volumes:
|
||||
ipfs-import:
|
||||
ipfs-data:
|
||||
db-data:
|
||||
@@ -25,3 +25,6 @@ services:
|
||||
image: cerc/laconic-registry-cli:local
|
||||
volumes:
|
||||
- ../config/fixturenet-laconicd/registry-cli-config-template.yml:/registry-cli-config-template.yml
|
||||
|
||||
volumes:
|
||||
laconicd-data:
|
||||
|
||||
@@ -8,17 +8,9 @@ services:
|
||||
image: cerc/lotus:local
|
||||
volumes:
|
||||
- ../config/fixturenet-lotus/setup-miner.sh:/docker-entrypoint-scripts.d/setup-miner.sh
|
||||
- ../config/fixturenet-lotus/genesis/devgen.car:/devgen.car
|
||||
- $HOME/stack-orchestrator/app/data/config/fixturenet-lotus/genesis/.genesis-sectors:/root/.genesis-sectors
|
||||
- ../config/fixturenet-lotus/fund-account.sh:/fund-account.sh
|
||||
- lotus_miner_params:/var/tmp/filecoin-proof-parameters
|
||||
- lotus-shared:/root/.lotus-shared
|
||||
healthcheck:
|
||||
# test: ["CMD-SHELL", "grep 'started ChainNotify channel' /var/log/lotus.log"]
|
||||
# test: ["CMD-SHELL", "[ -f /root/.lotus-shared/miner.addr ]"]
|
||||
test: ["CMD-SHELL", "[ -d /root/.lotus-miner-local-net ]"]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 60s
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-miner.sh"]
|
||||
ports:
|
||||
- "1234"
|
||||
@@ -30,14 +22,22 @@ services:
|
||||
hostname: lotus-node-1
|
||||
env_file:
|
||||
- ../config/fixturenet-lotus/lotus-env.env
|
||||
environment:
|
||||
# Use 0.0.0.0 so that calls can be made from outside the container
|
||||
- LOTUS_API_LISTENADDRESS=/ip4/0.0.0.0/tcp/1234/http
|
||||
image: cerc/lotus:local
|
||||
volumes:
|
||||
- ../config/fixturenet-lotus/setup-node.sh:/docker-entrypoint-scripts.d/setup-node.sh
|
||||
- ../config/fixturenet-lotus/genesis/devgen.car:/devgen.car
|
||||
- lotus_node_1_params:/var/tmp/filecoin-proof-parameters
|
||||
- lotus-shared:/root/.lotus-shared
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "1234"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
depends_on:
|
||||
lotus-miner:
|
||||
condition: service_healthy
|
||||
- lotus-miner
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
||||
ports:
|
||||
- "1234"
|
||||
@@ -49,14 +49,22 @@ services:
|
||||
hostname: lotus-node-2
|
||||
env_file:
|
||||
- ../config/fixturenet-lotus/lotus-env.env
|
||||
environment:
|
||||
# Use 0.0.0.0 so that calls can be made from outside the container
|
||||
- LOTUS_API_LISTENADDRESS=/ip4/0.0.0.0/tcp/1234/http
|
||||
image: cerc/lotus:local
|
||||
volumes:
|
||||
- ../config/fixturenet-lotus/setup-node.sh:/docker-entrypoint-scripts.d/setup-node.sh
|
||||
- ../config/fixturenet-lotus/genesis/devgen.car:/devgen.car
|
||||
- lotus_node_2_params:/var/tmp/filecoin-proof-parameters
|
||||
- lotus-shared:/root/.lotus-shared
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "1234"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
depends_on:
|
||||
lotus-miner:
|
||||
condition: service_healthy
|
||||
- lotus-miner
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
||||
ports:
|
||||
- "1234"
|
||||
@@ -65,4 +73,7 @@ services:
|
||||
- "1777"
|
||||
|
||||
volumes:
|
||||
lotus-shared:
|
||||
lotus_miner_params:
|
||||
lotus_node_1_params:
|
||||
lotus_node_2_params:
|
||||
lotus-shared:
|
||||
|
||||
@@ -23,10 +23,10 @@ services:
|
||||
command: |
|
||||
"./wait-for-it.sh -h ${CERC_L1_HOST:-$${DEFAULT_CERC_L1_HOST}} -p ${CERC_L1_PORT:-$${DEFAULT_CERC_L1_PORT}} -s -t 60 -- ./run.sh"
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/app/packages/contracts-bedrock/wait-for-it.sh
|
||||
- ../container-build/cerc-optimism-contracts/hardhat-tasks/verify-contract-deployment.ts:/app/packages/contracts-bedrock/tasks/verify-contract-deployment.ts
|
||||
- ../container-build/cerc-optimism-contracts/hardhat-tasks/rekey-json.ts:/app/packages/contracts-bedrock/tasks/rekey-json.ts
|
||||
- ../container-build/cerc-optimism-contracts/hardhat-tasks/send-balance.ts:/app/packages/contracts-bedrock/tasks/send-balance.ts
|
||||
- ../config/network/wait-for-it.sh:/app/packages/contracts-bedrock/wait-for-it.sh
|
||||
- ../config/optimism-contracts/hardhat-tasks/verify-contract-deployment.ts:/app/packages/contracts-bedrock/tasks/verify-contract-deployment.ts
|
||||
- ../config/optimism-contracts/hardhat-tasks/rekey-json.ts:/app/packages/contracts-bedrock/tasks/rekey-json.ts
|
||||
- ../config/optimism-contracts/hardhat-tasks/send-balance.ts:/app/packages/contracts-bedrock/tasks/send-balance.ts
|
||||
- ../config/fixturenet-optimism/optimism-contracts/update-config.js:/app/packages/contracts-bedrock/update-config.js
|
||||
- ../config/fixturenet-optimism/optimism-contracts/run.sh:/app/packages/contracts-bedrock/run.sh
|
||||
- l2_accounts:/l2-accounts
|
||||
@@ -120,7 +120,7 @@ services:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
CERC_L1_RPC: ${CERC_L1_RPC}
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/wait-for-it.sh
|
||||
- ../config/network/wait-for-it.sh:/wait-for-it.sh
|
||||
- ../config/fixturenet-optimism/run-op-batcher.sh:/run-op-batcher.sh
|
||||
- l2_accounts:/l2-accounts:ro
|
||||
entrypoint: ["sh", "-c"]
|
||||
@@ -145,7 +145,7 @@ services:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
CERC_L1_RPC: ${CERC_L1_RPC}
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/wait-for-it.sh
|
||||
- ../config/network/wait-for-it.sh:/wait-for-it.sh
|
||||
- ../config/fixturenet-optimism/run-op-proposer.sh:/run-op-proposer.sh
|
||||
- l1_deployment:/contracts-bedrock:ro
|
||||
- l2_accounts:/l2-accounts:ro
|
||||
|
||||
@@ -9,7 +9,6 @@ services:
|
||||
image: cerc/fixturenet-plugeth-plugeth:local
|
||||
volumes:
|
||||
- fixturenet_plugeth_bootnode_geth_data:/root/ethdata
|
||||
- ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins
|
||||
ports:
|
||||
- "9898"
|
||||
- "30303"
|
||||
@@ -20,7 +19,7 @@ services:
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
environment:
|
||||
CERC_REMOTE_DEBUG: "true"
|
||||
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
||||
CERC_RUN_STATEDIFF: "detect"
|
||||
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
@@ -29,7 +28,6 @@ services:
|
||||
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
|
||||
@@ -61,14 +59,13 @@ services:
|
||||
- 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
|
||||
image: cerc/fixturenet-eth-lighthouse:local
|
||||
|
||||
fixturenet-eth-lighthouse-1:
|
||||
restart: always
|
||||
@@ -85,7 +82,7 @@ services:
|
||||
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
|
||||
image: cerc/fixturenet-eth-lighthouse:local
|
||||
volumes:
|
||||
- fixturenet_plugeth_lighthouse_1_data:/opt/testnet/build/cl
|
||||
depends_on:
|
||||
@@ -112,7 +109,7 @@ services:
|
||||
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
|
||||
image: cerc/fixturenet-eth-lighthouse:local
|
||||
volumes:
|
||||
- fixturenet_plugeth_lighthouse_2_data:/opt/testnet/build/cl
|
||||
depends_on:
|
||||
|
||||
@@ -25,8 +25,8 @@ services:
|
||||
PROM_HTTP: "true"
|
||||
PROM_HTTP_ADDR: "0.0.0.0"
|
||||
PROM_HTTP_PORT: "8090"
|
||||
LOGRUS_LEVEL: "debug"
|
||||
CERC_REMOTE_DEBUG: "true"
|
||||
LOG_LEVEL: "debug"
|
||||
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ../config/ipld-eth-server/chain.json
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
version: "3.2"
|
||||
|
||||
services:
|
||||
lasso:
|
||||
image: cerc/lasso:local
|
||||
restart: always
|
||||
ports:
|
||||
- "0.0.0.0:3000:3000"
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
services:
|
||||
|
||||
mainnet-eth-geth-1:
|
||||
restart: always
|
||||
hostname: mainnet-eth-geth-1
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
environment:
|
||||
CERC_REMOTE_DEBUG: "true"
|
||||
CERC_RUN_STATEDIFF: ${CERC_RUN_STATEDIFF:-detect}
|
||||
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
image: cerc/go-ethereum:local
|
||||
entrypoint: /bin/sh
|
||||
command: -c "/opt/run-geth.sh"
|
||||
volumes:
|
||||
- mainnet_eth_geth_1_data:/root/ethdata
|
||||
- mainnet_eth_config_data:/etc/mainnet-eth
|
||||
- ../config/mainnet-eth/scripts/run-geth.sh:/opt/run-geth.sh
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "8545"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
ports:
|
||||
- "8545"
|
||||
- "40000"
|
||||
- "6060"
|
||||
|
||||
mainnet-eth-lighthouse-1:
|
||||
restart: always
|
||||
hostname: mainnet-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
|
||||
environment:
|
||||
EXECUTION_ENDPOINT: "http://mainnet-eth-geth-1:8551"
|
||||
image: cerc/lighthouse:local
|
||||
entrypoint: /bin/sh
|
||||
command: -c "/opt/run-lighthouse.sh"
|
||||
volumes:
|
||||
- mainnet_eth_lighthouse_1_data:/var/lighthouse-data-dir
|
||||
- mainnet_eth_config_data:/etc/mainnet-eth
|
||||
- ../config/mainnet-eth/scripts/run-lighthouse.sh:/opt/run-lighthouse.sh
|
||||
ports:
|
||||
- "8001"
|
||||
|
||||
volumes:
|
||||
mainnet_eth_config_data:
|
||||
mainnet_eth_geth_1_data:
|
||||
mainnet_eth_lighthouse_1_data:
|
||||
@@ -0,0 +1,17 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
go-opera:
|
||||
restart: unless-stopped
|
||||
image: cerc/go-opera:local
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/start-node.sh"]
|
||||
volumes:
|
||||
- ../config/mainnet-go-opera/start-node.sh:/docker-entrypoint-scripts.d/start-node.sh
|
||||
# TODO: ports taken from dockerfile, determine which are needed
|
||||
ports:
|
||||
- "5050:5050" # p2p port, needed
|
||||
- "5050:5050/udp"
|
||||
- "18545:18545" # http rpc port
|
||||
- "18546:18546" # websockets rpc port
|
||||
#- "18547" # unknown
|
||||
#- "19090" # unknown
|
||||
@@ -0,0 +1,30 @@
|
||||
services:
|
||||
laconicd:
|
||||
restart: no
|
||||
image: cerc/laconicd:local
|
||||
command: ["/bin/sh", "-c", "while :; do sleep 600; done"]
|
||||
volumes:
|
||||
# The cosmos-sdk node's database directory:
|
||||
- laconicd-data:/root/.laconicd/data
|
||||
# TODO: look at folding these scripts into the container
|
||||
- ../config/mainnet-laconicd/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
|
||||
- ../config/mainnet-laconicd/export-mykey.sh:/docker-entrypoint-scripts.d/export-mykey.sh
|
||||
- ../config/mainnet-laconicd/export-myaddress.sh:/docker-entrypoint-scripts.d/export-myaddress.sh
|
||||
# TODO: determine which of the ports below is really needed
|
||||
ports:
|
||||
- "6060"
|
||||
- "26657"
|
||||
- "26656"
|
||||
- "9473:9473"
|
||||
- "8545"
|
||||
- "8546"
|
||||
- "9090"
|
||||
- "9091"
|
||||
- "1317"
|
||||
cli:
|
||||
image: cerc/laconic-registry-cli:local
|
||||
volumes:
|
||||
- ../config/mainnet-laconicd/registry-cli-config-template.yml:/registry-cli-config-template.yml
|
||||
|
||||
volumes:
|
||||
laconicd-data:
|
||||
@@ -14,16 +14,18 @@ services:
|
||||
CERC_APP_WATCHER_URL: ${CERC_APP_WATCHER_URL}
|
||||
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||
CERC_BUILD_DIR: "@cerc-io/mobymask-ui/build"
|
||||
CERC_RELEASE: "v0.1.5"
|
||||
CERC_USE_NPM: true
|
||||
CERC_CONFIG_FILE: "src/config.json"
|
||||
working_dir: /scripts
|
||||
command: ["sh", "mobymask-app-start.sh"]
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
||||
- ../config/watcher-mobymask-v2/mobymask-app-config.json:/app/src/mobymask-app-config.json
|
||||
- peers_ids:/peers
|
||||
- mobymask_deployment:/server
|
||||
ports:
|
||||
- "0.0.0.0:3002:80"
|
||||
- "127.0.0.1:3002:80"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "80"]
|
||||
interval: 20s
|
||||
@@ -46,16 +48,18 @@ services:
|
||||
CERC_APP_WATCHER_URL: ${CERC_APP_WATCHER_URL}
|
||||
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||
CERC_BUILD_DIR: "@cerc-io/mobymask-ui-lxdao/build"
|
||||
CERC_RELEASE: "v0.1.5-lxdao-0.1.1"
|
||||
CERC_USE_NPM: false
|
||||
CERC_CONFIG_FILE: "src/utils/config.json"
|
||||
working_dir: /scripts
|
||||
command: ["sh", "mobymask-app-start.sh"]
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
||||
- ../config/watcher-mobymask-v2/mobymask-app-config.json:/app/src/mobymask-app-config.json
|
||||
- peers_ids:/peers
|
||||
- mobymask_deployment:/server
|
||||
ports:
|
||||
- "0.0.0.0:3004:80"
|
||||
- "127.0.0.1:3004:80"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "localhost", "80"]
|
||||
interval: 20s
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
# Builds and serves the peer-test react-app
|
||||
peer-test-app:
|
||||
# Builds and serves the peer-test react-app
|
||||
restart: unless-stopped
|
||||
image: cerc/react-peer:local
|
||||
working_dir: /scripts
|
||||
env_file:
|
||||
@@ -13,11 +14,11 @@ services:
|
||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||
command: ["sh", "test-app-start.sh"]
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||
- ../config/network/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||
- ../config/watcher-mobymask-v2/test-app-start.sh:/scripts/test-app-start.sh
|
||||
- peers_ids:/peers
|
||||
ports:
|
||||
- "0.0.0.0:3003:80"
|
||||
- "127.0.0.1:3003:80"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "80"]
|
||||
interval: 20s
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
reth:
|
||||
restart: unless-stopped
|
||||
hostname: reth
|
||||
image: cerc/reth:local
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/start-reth.sh"]
|
||||
volumes:
|
||||
- ../config/reth/start-reth.sh:/docker-entrypoint-scripts.d/start-reth.sh
|
||||
- reth_data:/root/.local/share/reth
|
||||
- shared_data:/root/.shared_data
|
||||
ports:
|
||||
- "8545:8545" # http rpc
|
||||
- "8546:8546" # ws rpc
|
||||
- "30303:30303" # network listening port
|
||||
- "30303:30303/udp"
|
||||
- "8551" # consensus auth
|
||||
|
||||
lighthouse:
|
||||
restart: unless-stopped
|
||||
hostname: lighthouse
|
||||
image: cerc/lighthouse:local
|
||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/start-lighthouse.sh"]
|
||||
volumes:
|
||||
- ../config/reth/start-lighthouse.sh:/docker-entrypoint-scripts.d/start-lighthouse.sh
|
||||
- lighthouse_data:/root/.lighthouse/mainnet
|
||||
- shared_data:/root/.shared_data
|
||||
ports:
|
||||
- "8001"
|
||||
|
||||
volumes:
|
||||
reth_data:
|
||||
lighthouse_data:
|
||||
shared_data:
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
environment:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
volumes:
|
||||
- test-data:/var
|
||||
- test-data:/data
|
||||
ports:
|
||||
- "80"
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ services:
|
||||
- ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh
|
||||
- mobymask_watcher_db_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "0.0.0.0:15432:5432"
|
||||
- "127.0.0.1:15432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
||||
interval: 20s
|
||||
@@ -44,7 +44,7 @@ services:
|
||||
CERC_L2_NODE_PORT: ${CERC_L2_NODE_PORT}
|
||||
command: ["sh", "deploy-and-generate-invite.sh"]
|
||||
volumes:
|
||||
- ../config/wait-for-it.sh:/app/packages/server/wait-for-it.sh
|
||||
- ../config/network/wait-for-it.sh:/app/packages/server/wait-for-it.sh
|
||||
- ../config/watcher-mobymask-v2/secrets-template.json:/app/packages/server/secrets-template.json
|
||||
- ../config/watcher-mobymask-v2/deploy-and-generate-invite.sh:/app/packages/server/deploy-and-generate-invite.sh
|
||||
- mobymask_deployment:/app/packages/server
|
||||
@@ -95,9 +95,9 @@ services:
|
||||
- mobymask_deployment:/server
|
||||
# Expose GQL, metrics and relay node ports
|
||||
ports:
|
||||
- "0.0.0.0:3001:3001"
|
||||
- "0.0.0.0:9001:9001"
|
||||
- "0.0.0.0:9090:9090"
|
||||
- "127.0.0.1:3001:3001"
|
||||
- "127.0.0.1:9001:9001"
|
||||
- "127.0.0.1:9090:9090"
|
||||
healthcheck:
|
||||
test: ["CMD", "busybox", "nc", "localhost", "9090"]
|
||||
interval: 20s
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
sushiswap-watcher-db:
|
||||
restart: unless-stopped
|
||||
image: postgres:14-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=vdbm
|
||||
- POSTGRES_MULTIPLE_DATABASES=erc20-watcher,sushi-watcher,sushi-info-watcher,erc20-watcher-job-queue,sushi-watcher-job-queue,sushi-info-watcher-job-queue
|
||||
- POSTGRES_EXTENSION=erc20-watcher-job-queue:pgcrypto,sushi-watcher-job-queue:pgcrypto,sushi-info-watcher-job-queue:pgcrypto
|
||||
- POSTGRES_PASSWORD=password
|
||||
command: ["postgres", "-c", "shared_preload_libraries=pg_stat_statements", "-c", "pg_stat_statements.track=all", "-c", "work_mem=2GB"]
|
||||
volumes:
|
||||
- ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh
|
||||
- ../config/postgresql/create-pg-stat-statements.sql:/docker-entrypoint-initdb.d/create-pg-stat-statements.sql
|
||||
- sushiswap_watcher_db_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "0.0.0.0:15435:5432"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 10s
|
||||
shm_size: '8GB'
|
||||
|
||||
erc20-watcher-server:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
sushiswap-watcher-db:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-sushiswap:local
|
||||
working_dir: /app/packages/erc20-watcher
|
||||
environment:
|
||||
- DEBUG=vulcanize:*
|
||||
command: ["node", "--enable-source-maps", "dist/server.js"]
|
||||
volumes:
|
||||
- ../config/watcher-sushiswap/erc20-watcher.toml:/app/packages/erc20-watcher/environments/local.toml
|
||||
ports:
|
||||
- "0.0.0.0:3005:3001"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "3001"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
sushi-watcher-job-runner:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
sushiswap-watcher-db:
|
||||
condition: service_healthy
|
||||
lotus-node-1:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-sushiswap:local
|
||||
working_dir: /app/packages/uni-watcher
|
||||
environment:
|
||||
- DEBUG=vulcanize:*
|
||||
command: ["node", "--enable-source-maps", "dist/job-runner.js"]
|
||||
volumes:
|
||||
- ../config/watcher-sushiswap/sushi-watcher.toml:/app/packages/uni-watcher/environments/local.toml
|
||||
- ../config/watcher-sushiswap/sushi-watcher-test.toml:/app/packages/uni-watcher/environments/test.toml
|
||||
ports:
|
||||
- "0.0.0.0:9004:9000"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "9000"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
sushi-watcher-server:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
sushiswap-watcher-db:
|
||||
condition: service_healthy
|
||||
sushi-watcher-job-runner:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-sushiswap:local
|
||||
env_file:
|
||||
- ../config/watcher-sushiswap/lotus-params.env
|
||||
environment:
|
||||
- DEBUG=vulcanize:*
|
||||
working_dir: /app/packages/uni-watcher
|
||||
command: ["node", "--enable-source-maps", "dist/server.js"]
|
||||
volumes:
|
||||
- ../config/watcher-sushiswap/sushi-watcher.toml:/app/packages/uni-watcher/environments/local.toml
|
||||
- ../config/watcher-sushiswap/sushi-watcher-test.toml:/app/packages/uni-watcher/environments/test.toml
|
||||
ports:
|
||||
- "0.0.0.0:3003:3003"
|
||||
- "0.0.0.0:9005:9001"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "3003"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
sushi-info-watcher-job-runner:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
sushiswap-watcher-db:
|
||||
condition: service_healthy
|
||||
erc20-watcher-server:
|
||||
condition: service_healthy
|
||||
lotus-node-1:
|
||||
condition: service_healthy
|
||||
sushi-watcher-server:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-sushiswap:local
|
||||
working_dir: /app/packages/uni-info-watcher
|
||||
environment:
|
||||
- DEBUG=vulcanize:*
|
||||
command: ["node", "--enable-source-maps", "dist/job-runner.js"]
|
||||
volumes:
|
||||
- ../config/watcher-sushiswap/sushi-info-watcher.toml:/app/packages/uni-info-watcher/environments/local.toml
|
||||
- ../config/watcher-sushiswap/sushi-info-watcher-test.toml:/app/packages/uni-info-watcher/environments/test.toml
|
||||
ports:
|
||||
- "0.0.0.0:9006:9002"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "9002"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
sushi-info-watcher-server:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
sushiswap-watcher-db:
|
||||
condition: service_healthy
|
||||
erc20-watcher-server:
|
||||
condition: service_healthy
|
||||
sushi-watcher-server:
|
||||
condition: service_healthy
|
||||
sushi-info-watcher-job-runner:
|
||||
condition: service_healthy
|
||||
image: cerc/watcher-sushiswap:local
|
||||
env_file:
|
||||
- ../config/watcher-sushiswap/lotus-params.env
|
||||
working_dir: /app/packages/uni-info-watcher
|
||||
command: ["node", "--enable-source-maps", "dist/server.js"]
|
||||
volumes:
|
||||
- ../config/watcher-sushiswap/sushi-info-watcher.toml:/app/packages/uni-info-watcher/environments/local.toml
|
||||
- ../config/watcher-sushiswap/sushi-info-watcher-test.toml:/app/packages/uni-info-watcher/environments/test.toml
|
||||
ports:
|
||||
- "0.0.0.0:3004:3004"
|
||||
- "0.0.0.0:9007:9003"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "3004"]
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
sushiswap-v3-info:
|
||||
depends_on:
|
||||
sushi-info-watcher-server:
|
||||
condition: service_healthy
|
||||
image: cerc/uniswap-v3-info:local
|
||||
ports:
|
||||
- "0.0.0.0:3006:3000"
|
||||
|
||||
# Deploys the core (UniswapV3Factory) contract
|
||||
sushiswap-v3-core:
|
||||
image: cerc/sushiswap-v3-core:local
|
||||
env_file:
|
||||
- ../config/watcher-sushiswap/lotus-params.env
|
||||
|
||||
# Deploys the periphery (NFPM, token, etc.) contracts
|
||||
sushiswap-v3-periphery:
|
||||
image: cerc/sushiswap-v3-periphery:local
|
||||
env_file:
|
||||
- ../config/watcher-sushiswap/lotus-params.env
|
||||
|
||||
volumes:
|
||||
sushiswap_watcher_db_data:
|
||||
@@ -18,7 +18,8 @@ CERC_STATEDIFF_DB_NAME="cerc_testing"
|
||||
CERC_STATEDIFF_DB_USER="vdbm"
|
||||
CERC_STATEDIFF_DB_PASSWORD="password"
|
||||
CERC_STATEDIFF_DB_GOOSE_MIN_VER=${CERC_STATEDIFF_DB_GOOSE_MIN_VER:-18}
|
||||
CERC_STATEDIFF_DB_LOG_STATEMENTS="false"
|
||||
CERC_STATEDIFF_DB_LOG_STATEMENTS="${CERC_STATEDIFF_DB_LOG_STATEMENTS:-false}"
|
||||
CERC_STATEDIFF_WORKERS=2
|
||||
|
||||
CERC_GETH_VMODULE="statediff/*=5,rpc/*=5"
|
||||
CERC_GETH_VERBOSITY=${CERC_GETH_VERBOSITY:-3}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ETH account with pk c05fd3613bcd62a4f25e5eba1f464d0b76d74c3f771a7c2f13e26ad6439444b3
|
||||
ETH_ADDRESS=0xD375B03bd3A2434A9f675bEC4Ccd68aC5e67C743
|
||||
AMOUNT=1000
|
||||
|
||||
# Pre-fund stat
|
||||
PREFUND_STAT_OUTPUT=$(lotus evm stat $ETH_ADDRESS)
|
||||
|
||||
FILECOIN_ADDRESS=$(echo "$PREFUND_STAT_OUTPUT" | grep -oP 'Filecoin address:\s+\K\S+')
|
||||
echo Filecoin address: "$FILECOIN_ADDRESS"
|
||||
|
||||
echo Sending balance to "$FILECOIN_ADDRESS"
|
||||
lotus send --from $(lotus wallet default) "$FILECOIN_ADDRESS" $AMOUNT
|
||||
|
||||
# Post-fund stat
|
||||
echo lotus evm stat $ETH_ADDRESS
|
||||
lotus evm stat $ETH_ADDRESS
|
||||
|
||||
echo "Account with ETH address $ETH_ADDRESS funded"
|
||||
-1
@@ -1 +0,0 @@
|
||||
}+V�{iνΆΠΉ�²�¨ΣΗ\k»qς␍—?δΪAΒfκ’~μ©™LΉ�tb·yqτ·²ηξΔ�Ο?ξaΣ�J
|
||||
-1
@@ -1 +0,0 @@
|
||||
Βfκ’~μ©™LΉ�tb·yqτ·²ηξΔ�Ο?ξaΣ�J
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -1,71 +0,0 @@
|
||||
{
|
||||
"t01000": {
|
||||
"ID": "t01000",
|
||||
"Owner": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"Worker": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"PeerId": "12D3KooWG5q6pWJVdPBhDBv9AjWVbUh4xxTAZ7xvgZSjczWuD2Z9",
|
||||
"MarketBalance": "0",
|
||||
"PowerBalance": "0",
|
||||
"SectorSize": 2048,
|
||||
"Sectors": [
|
||||
{
|
||||
"CommR": {
|
||||
"/": "bagboea4b5abcboxypcewlkmrat2myu4vthk3ii2pcomak7nhqmdbb6sxlolp2wdf"
|
||||
},
|
||||
"CommD": {
|
||||
"/": "baga6ea4seaqn3jfixthmdgksv4vhfeuyvr6upw6tvaqbmzmsyxnzosm4pwgnmlq"
|
||||
},
|
||||
"SectorID": 0,
|
||||
"Deal": {
|
||||
"PieceCID": {
|
||||
"/": "baga6ea4seaqn3jfixthmdgksv4vhfeuyvr6upw6tvaqbmzmsyxnzosm4pwgnmlq"
|
||||
},
|
||||
"PieceSize": 2048,
|
||||
"VerifiedDeal": false,
|
||||
"Client": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"Provider": "t01000",
|
||||
"Label": "0",
|
||||
"StartEpoch": 0,
|
||||
"EndEpoch": 9001,
|
||||
"StoragePricePerEpoch": "0",
|
||||
"ProviderCollateral": "0",
|
||||
"ClientCollateral": "0"
|
||||
},
|
||||
"DealClientKey": {
|
||||
"Type": "bls",
|
||||
"PrivateKey": "tFvSRiSg2G3Ssgg0PSYy23XyjaIMXpsmdyG2B7UFLT4="
|
||||
},
|
||||
"ProofType": 5
|
||||
},
|
||||
{
|
||||
"CommR": {
|
||||
"/": "bagboea4b5abcb6krzypqcczhcnbeyjcqkeo6omfergm336o3kitugh3jgjog2yqq"
|
||||
},
|
||||
"CommD": {
|
||||
"/": "baga6ea4seaqhondpb2373hjasjplxvbjzi5n5mm4fbbhjxp5ptnbq4cibapkeii"
|
||||
},
|
||||
"SectorID": 1,
|
||||
"Deal": {
|
||||
"PieceCID": {
|
||||
"/": "baga6ea4seaqhondpb2373hjasjplxvbjzi5n5mm4fbbhjxp5ptnbq4cibapkeii"
|
||||
},
|
||||
"PieceSize": 2048,
|
||||
"VerifiedDeal": false,
|
||||
"Client": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"Provider": "t01000",
|
||||
"Label": "1",
|
||||
"StartEpoch": 0,
|
||||
"EndEpoch": 9001,
|
||||
"StoragePricePerEpoch": "0",
|
||||
"ProviderCollateral": "0",
|
||||
"ClientCollateral": "0"
|
||||
},
|
||||
"DealClientKey": {
|
||||
"Type": "bls",
|
||||
"PrivateKey": "tFvSRiSg2G3Ssgg0PSYy23XyjaIMXpsmdyG2B7UFLT4="
|
||||
},
|
||||
"ProofType": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
7b2254797065223a22626c73222c22507269766174654b6579223a227446765352695367324733537367673050535979323358796a61494d5870736d64794732423755464c54343d227d
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"ID": "f355523e-69d0-4984-bd0e-9588487c6231",
|
||||
"Weight": 0,
|
||||
"CanSeal": false,
|
||||
"CanStore": false,
|
||||
"MaxStorage": 0,
|
||||
"Groups": null,
|
||||
"AllowTo": null,
|
||||
"AllowTypes": null,
|
||||
"DenyTypes": null
|
||||
}
|
||||
Binary file not shown.
@@ -1,108 +0,0 @@
|
||||
{
|
||||
"NetworkVersion": 18,
|
||||
"Accounts": [
|
||||
{
|
||||
"Type": "account",
|
||||
"Balance": "50000000000000000000000000",
|
||||
"Meta": {
|
||||
"Owner": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Miners": [
|
||||
{
|
||||
"ID": "t01000",
|
||||
"Owner": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"Worker": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"PeerId": "12D3KooWG5q6pWJVdPBhDBv9AjWVbUh4xxTAZ7xvgZSjczWuD2Z9",
|
||||
"MarketBalance": "0",
|
||||
"PowerBalance": "0",
|
||||
"SectorSize": 2048,
|
||||
"Sectors": [
|
||||
{
|
||||
"CommR": {
|
||||
"/": "bagboea4b5abcboxypcewlkmrat2myu4vthk3ii2pcomak7nhqmdbb6sxlolp2wdf"
|
||||
},
|
||||
"CommD": {
|
||||
"/": "baga6ea4seaqn3jfixthmdgksv4vhfeuyvr6upw6tvaqbmzmsyxnzosm4pwgnmlq"
|
||||
},
|
||||
"SectorID": 0,
|
||||
"Deal": {
|
||||
"PieceCID": {
|
||||
"/": "baga6ea4seaqn3jfixthmdgksv4vhfeuyvr6upw6tvaqbmzmsyxnzosm4pwgnmlq"
|
||||
},
|
||||
"PieceSize": 2048,
|
||||
"VerifiedDeal": false,
|
||||
"Client": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"Provider": "t01000",
|
||||
"Label": "0",
|
||||
"StartEpoch": 0,
|
||||
"EndEpoch": 9001,
|
||||
"StoragePricePerEpoch": "0",
|
||||
"ProviderCollateral": "0",
|
||||
"ClientCollateral": "0"
|
||||
},
|
||||
"DealClientKey": {
|
||||
"Type": "bls",
|
||||
"PrivateKey": "tFvSRiSg2G3Ssgg0PSYy23XyjaIMXpsmdyG2B7UFLT4="
|
||||
},
|
||||
"ProofType": 5
|
||||
},
|
||||
{
|
||||
"CommR": {
|
||||
"/": "bagboea4b5abcb6krzypqcczhcnbeyjcqkeo6omfergm336o3kitugh3jgjog2yqq"
|
||||
},
|
||||
"CommD": {
|
||||
"/": "baga6ea4seaqhondpb2373hjasjplxvbjzi5n5mm4fbbhjxp5ptnbq4cibapkeii"
|
||||
},
|
||||
"SectorID": 1,
|
||||
"Deal": {
|
||||
"PieceCID": {
|
||||
"/": "baga6ea4seaqhondpb2373hjasjplxvbjzi5n5mm4fbbhjxp5ptnbq4cibapkeii"
|
||||
},
|
||||
"PieceSize": 2048,
|
||||
"VerifiedDeal": false,
|
||||
"Client": "t3spusn5ia57qezc3fwpe3n2lhb4y4xt67xoflqbqy2muliparw2uktevletuv7gl4qakjpafgcl7jk2s2er3q",
|
||||
"Provider": "t01000",
|
||||
"Label": "1",
|
||||
"StartEpoch": 0,
|
||||
"EndEpoch": 9001,
|
||||
"StoragePricePerEpoch": "0",
|
||||
"ProviderCollateral": "0",
|
||||
"ClientCollateral": "0"
|
||||
},
|
||||
"DealClientKey": {
|
||||
"Type": "bls",
|
||||
"PrivateKey": "tFvSRiSg2G3Ssgg0PSYy23XyjaIMXpsmdyG2B7UFLT4="
|
||||
},
|
||||
"ProofType": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"NetworkName": "localnet-6d52dae5-ff29-4bac-a45d-f84e6c07564c",
|
||||
"VerifregRootKey": {
|
||||
"Type": "multisig",
|
||||
"Balance": "0",
|
||||
"Meta": {
|
||||
"Signers": [
|
||||
"t1ceb34gnsc6qk5dt6n7xg6ycwzasjhbxm3iylkiy"
|
||||
],
|
||||
"Threshold": 1,
|
||||
"VestingDuration": 0,
|
||||
"VestingStart": 0
|
||||
}
|
||||
},
|
||||
"RemainderAccount": {
|
||||
"Type": "multisig",
|
||||
"Balance": "0",
|
||||
"Meta": {
|
||||
"Signers": [
|
||||
"t1ceb34gnsc6qk5dt6n7xg6ycwzasjhbxm3iylkiy"
|
||||
],
|
||||
"Threshold": 1,
|
||||
"VestingDuration": 0,
|
||||
"VestingStart": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
LOTUS_PATH=~/.lotus-local-net
|
||||
LOTUS_MINER_PATH=~/.lotus-miner-local-net
|
||||
LOTUS_PATH=/root/.lotus-local-net
|
||||
LOTUS_MINER_PATH=/root/.lotus-miner-local-net
|
||||
LOTUS_SKIP_GENESIS_CHECK=_yes_
|
||||
LOTUS_FEVM_ENABLEETHRPC=true
|
||||
CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__"
|
||||
CGO_CFLAGS="-D__BLST_PORTABLE__"
|
||||
|
||||
@@ -2,34 +2,48 @@
|
||||
|
||||
lotus --version
|
||||
|
||||
# # remove old bootnode peer info if present
|
||||
# [ -f /root/.lotus-shared/miner.addr ] && rm /root/.lotus-shared/miner.addr
|
||||
# remove old bootnode peer info if present
|
||||
if [ -f /root/.lotus-shared/miner.addr ]; then
|
||||
rm /root/.lotus-shared/miner.addr
|
||||
fi
|
||||
|
||||
##TODO: generate genesis files inside container instead of bundling in config dir
|
||||
##something like commands below should work, other scripts/compose will have to be updated to corresponding directories
|
||||
# lotus fetch-params 2048
|
||||
# lotus-seed pre-seal --sector-size 2KiB --num-sectors 2
|
||||
# lotus-seed genesis new localnet.json
|
||||
# lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json
|
||||
# Check if filecoin-proof-parameters exist; avoid fetching if they do
|
||||
if [ -z "$(find "/var/tmp/filecoin-proof-parameters" -maxdepth 1 -type f)" ]; then
|
||||
echo "Proof params not found, fetching..."
|
||||
lotus fetch-params 2048
|
||||
else
|
||||
echo "Existing proof params found"
|
||||
fi
|
||||
|
||||
lotus-seed pre-seal --sector-size 2KiB --num-sectors 2
|
||||
lotus-seed genesis new localnet.json
|
||||
lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json
|
||||
|
||||
# start daemon
|
||||
nohup lotus daemon --genesis=/devgen.car --profile=bootstrapper --bootstrap=false > /var/log/lotus.log 2>&1 &
|
||||
nohup lotus daemon --lotus-make-genesis=devgen.car --profile=bootstrapper --genesis-template=localnet.json --bootstrap=false > /var/log/lotus.log 2>&1 &
|
||||
|
||||
# Loop until the daemon is started
|
||||
echo "Waiting for daemon to start..."
|
||||
while ! grep -q "started ChainNotify channel" /var/log/lotus.log ; do
|
||||
sleep 5
|
||||
sleep 5
|
||||
done
|
||||
echo "Daemon started."
|
||||
|
||||
# copy genesis file to shared volume
|
||||
cp /devgen.car /root/.lotus-shared
|
||||
|
||||
# publish bootnode peer info to shared volume
|
||||
lotus net listen | awk 'NR==1{print}' > /root/.lotus-shared/miner.addr
|
||||
# TODO: Improve exporting public address to shared volume
|
||||
lotus net listen | awk 'NR==4{print}' > /root/.lotus-shared/miner.addr
|
||||
|
||||
# if miner not already initialized
|
||||
if [ ! -d /root/.lotus-miner-local-net ]; then
|
||||
if [ ! -d $LOTUS_MINER_PATH ]; then
|
||||
# initialize miner
|
||||
lotus wallet import --as-default ~/.genesis-sectors/pre-seal-t01000.key
|
||||
|
||||
# fund a known account for usage
|
||||
/fund-account.sh
|
||||
|
||||
lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync
|
||||
fi
|
||||
|
||||
|
||||
@@ -2,23 +2,28 @@
|
||||
|
||||
lotus --version
|
||||
|
||||
##TODO: paths can use values from lotus-env.env file
|
||||
# Loop until the daemon is started
|
||||
echo "Waiting for miner to share peering info..."
|
||||
while [ ! -f /root/.lotus-shared/miner.addr ]; do
|
||||
sleep 5
|
||||
done
|
||||
echo "Resuming..."
|
||||
|
||||
# if not already initialized
|
||||
if [ ! -f /root/.lotus-local-net/config.toml ]; then
|
||||
if [ ! -f $LOTUS_PATH/config.toml ]; then
|
||||
# init node config
|
||||
mkdir $HOME/.lotus-local-net
|
||||
lotus config default > $HOME/.lotus-local-net/config.toml
|
||||
mkdir $LOTUS_PATH
|
||||
lotus config default > $LOTUS_PATH/config.toml
|
||||
|
||||
# add bootstrap peer info if available
|
||||
if [ -f /root/.lotus-shared/miner.addr ]; then
|
||||
MINER_ADDR=\"$(cat /root/.lotus-shared/miner.addr)\"
|
||||
# add bootstrap peer id to config file
|
||||
sed -i "/^\[Libp2p\]/a \ \ BootstrapPeers = [$MINER_ADDR]" $HOME/.lotus-local-net/config.toml
|
||||
sed -i "/^\[Libp2p\]/a \ \ BootstrapPeers = [$MINER_ADDR]" $LOTUS_PATH/config.toml
|
||||
else
|
||||
echo "Bootstrap peer info not found, unable to configure. Manual peering will be required."
|
||||
fi
|
||||
fi
|
||||
|
||||
# start node
|
||||
lotus daemon --genesis=/devgen.car
|
||||
lotus daemon --genesis=/root/.lotus-shared/devgen.car
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
See: https://docs.plugeth.org/
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
CERC_ETH_DATADIR=/root/ethdata
|
||||
|
||||
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
|
||||
|
||||
# See https://linuxconfig.org/how-to-propagate-a-signal-to-child-processes-from-a-bash-script
|
||||
cleanup() {
|
||||
echo "Signal received, cleaning up..."
|
||||
|
||||
# Kill the child process first (CERC_REMOTE_DEBUG=true uses dlv which starts geth as a child process)
|
||||
pkill -P ${geth_pid}
|
||||
sleep 2
|
||||
kill $(jobs -p)
|
||||
|
||||
wait
|
||||
echo "Done"
|
||||
}
|
||||
|
||||
trap 'cleanup' SIGINT SIGTERM
|
||||
|
||||
$START_CMD \
|
||||
--datadir="${CERC_ETH_DATADIR}" \
|
||||
--authrpc.addr="0.0.0.0" \
|
||||
--authrpc.port 8551 \
|
||||
--authrpc.vhosts="*" \
|
||||
--authrpc.jwtsecret="/etc/mainnet-eth/jwtsecret" \
|
||||
--ws \
|
||||
--ws.addr="0.0.0.0" \
|
||||
--ws.origins="*" \
|
||||
--ws.api="${CERC_GETH_WS_APIS:-eth,web3,net,admin,personal,debug,statediff}" \
|
||||
--http.corsdomain="*" \
|
||||
--gcmode full \
|
||||
--txlookuplimit=0 \
|
||||
--cache.preimages \
|
||||
--syncmode=snap \
|
||||
&
|
||||
|
||||
geth_pid=$!
|
||||
|
||||
|
||||
wait $geth_pid
|
||||
|
||||
if [ "true" == "$CERC_KEEP_RUNNING_AFTER_GETH_EXIT" ]; then
|
||||
while [ 1 -eq 1 ]; do
|
||||
sleep 60
|
||||
done
|
||||
fi
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
DEBUG_LEVEL=${CERC_LIGHTHOUSE_DEBUG_LEVEL:-info}
|
||||
|
||||
data_dir=/var/lighthouse-data-dir
|
||||
|
||||
network_port=9001
|
||||
http_port=8001
|
||||
authrpc_port=8551
|
||||
|
||||
exec lighthouse \
|
||||
bn \
|
||||
--debug-level $DEBUG_LEVEL \
|
||||
--datadir $data_dir \
|
||||
--network mainnet \
|
||||
--execution-endpoint $EXECUTION_ENDPOINT \
|
||||
--execution-jwt /etc/mainnet-eth/jwtsecret \
|
||||
--disable-deposit-contract-sync \
|
||||
--checkpoint-sync-url https://beaconstate.ethstaker.cc
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# download genesis file
|
||||
wget https://download.fantom.network/mainnet-109331-no-history.g
|
||||
|
||||
./opera --genesis=mainnet-109331-no-history.g --db.preset ldb-1 --syncmode snap --http --http.addr="0.0.0.0" --http.corsdomain="*" --http.api=eth,web3,net,txpool,ftm --ws --ws.addr="0.0.0.0" --ws.origins="*" --ws.api=eth,web3,net,txpool,ftm --cache 8192
|
||||
#tail -f /dev/null
|
||||
@@ -0,0 +1,118 @@
|
||||
#!/bin/bash
|
||||
|
||||
# TODO: this file is now an unmodified copy of cerc-io/laconicd/init.sh
|
||||
# so we should have a mechanism to bundle it inside the container rather than link from here
|
||||
# at deploy time.
|
||||
|
||||
KEY="mykey"
|
||||
CHAINID="laconic_9000-1"
|
||||
MONIKER="localtestnet"
|
||||
KEYRING="test"
|
||||
KEYALGO="eth_secp256k1"
|
||||
LOGLEVEL="info"
|
||||
# trace evm
|
||||
TRACE="--trace"
|
||||
# TRACE=""
|
||||
|
||||
# validate dependencies are installed
|
||||
command -v jq > /dev/null 2>&1 || { echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"; exit 1; }
|
||||
|
||||
# remove existing daemon and client
|
||||
rm -rf ~/.laconic*
|
||||
|
||||
make install
|
||||
|
||||
laconicd config keyring-backend $KEYRING
|
||||
laconicd config chain-id $CHAINID
|
||||
|
||||
# if $KEY exists it should be deleted
|
||||
laconicd keys add $KEY --keyring-backend $KEYRING --algo $KEYALGO
|
||||
|
||||
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
|
||||
laconicd init $MONIKER --chain-id $CHAINID
|
||||
|
||||
# Change parameter token denominations to aphoton
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
# Custom modules
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["record_rent"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_rent"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_auction_commit_fee"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_auction_reveal_fee"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_auction_minimum_bid"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
|
||||
if [[ "$TEST_REGISTRY_EXPIRY" == "true" ]]; then
|
||||
echo "Setting timers for expiry tests."
|
||||
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["record_rent_duration"]="60s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_grace_period"]="60s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_rent_duration"]="60s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
fi
|
||||
|
||||
if [[ "$TEST_AUCTION_ENABLED" == "true" ]]; then
|
||||
echo "Enabling auction and setting timers."
|
||||
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_auction_enabled"]=true' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_rent_duration"]="60s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_grace_period"]="300s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_auction_commits_duration"]="60s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_auction_reveals_duration"]="60s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
fi
|
||||
|
||||
# increase block time (?)
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.consensus_params["block"]["time_iota_ms"]="1000"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
|
||||
# Set gas limit in genesis
|
||||
cat $HOME/.laconicd/config/genesis.json | jq '.consensus_params["block"]["max_gas"]="10000000"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
|
||||
# disable produce empty block
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
sed -i '' 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml
|
||||
else
|
||||
sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml
|
||||
fi
|
||||
|
||||
if [[ $1 == "pending" ]]; then
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
sed -i '' 's/create_empty_blocks_interval = "0s"/create_empty_blocks_interval = "30s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i '' 's/timeout_propose = "3s"/timeout_propose = "30s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i '' 's/timeout_propose_delta = "500ms"/timeout_propose_delta = "5s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i '' 's/timeout_prevote = "1s"/timeout_prevote = "10s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i '' 's/timeout_prevote_delta = "500ms"/timeout_prevote_delta = "5s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i '' 's/timeout_precommit = "1s"/timeout_precommit = "10s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i '' 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "5s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i '' 's/timeout_commit = "5s"/timeout_commit = "150s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i '' 's/timeout_broadcast_tx_commit = "10s"/timeout_broadcast_tx_commit = "150s"/g' $HOME/.laconicd/config/config.toml
|
||||
else
|
||||
sed -i 's/create_empty_blocks_interval = "0s"/create_empty_blocks_interval = "30s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i 's/timeout_propose = "3s"/timeout_propose = "30s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i 's/timeout_propose_delta = "500ms"/timeout_propose_delta = "5s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i 's/timeout_prevote = "1s"/timeout_prevote = "10s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i 's/timeout_prevote_delta = "500ms"/timeout_prevote_delta = "5s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i 's/timeout_precommit = "1s"/timeout_precommit = "10s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "5s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i 's/timeout_commit = "5s"/timeout_commit = "150s"/g' $HOME/.laconicd/config/config.toml
|
||||
sed -i 's/timeout_broadcast_tx_commit = "10s"/timeout_broadcast_tx_commit = "150s"/g' $HOME/.laconicd/config/config.toml
|
||||
fi
|
||||
fi
|
||||
|
||||
# Allocate genesis accounts (cosmos formatted addresses)
|
||||
laconicd add-genesis-account $KEY 100000000000000000000000000aphoton --keyring-backend $KEYRING
|
||||
|
||||
# Sign genesis transaction
|
||||
laconicd gentx $KEY 1000000000000000000000aphoton --keyring-backend $KEYRING --chain-id $CHAINID
|
||||
|
||||
# Collect genesis tx
|
||||
laconicd collect-gentxs
|
||||
|
||||
# Run this to ensure everything worked and that the genesis file is setup correctly
|
||||
laconicd validate-genesis
|
||||
|
||||
if [[ $1 == "pending" ]]; then
|
||||
echo "pending mode is on, please wait for the first block committed."
|
||||
fi
|
||||
|
||||
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
||||
laconicd start --pruning=nothing --evm.tracer=json $TRACE --log_level $LOGLEVEL --minimum-gas-prices=0.0001aphoton --json-rpc.api eth,txpool,personal,net,debug,web3,miner --api.enable --gql-server --gql-playground
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
laconicd keys show mykey | grep address | cut -d ' ' -f 3
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo y | laconicd keys export mykey --unarmored-hex --unsafe
|
||||
@@ -0,0 +1,9 @@
|
||||
services:
|
||||
cns:
|
||||
restEndpoint: 'http://laconicd:1317'
|
||||
gqlEndpoint: 'http://laconicd:9473/api'
|
||||
userKey: REPLACE_WITH_MYKEY
|
||||
bondId:
|
||||
chainId: laconic_9000-1
|
||||
gas: 250000
|
||||
fees: 200000aphoton
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Wait for reth container to create jwt auth token
|
||||
while [ ! -f /root/.shared_data/jwt.hex ]; do
|
||||
echo "Jwt auth token not found, sleeping for 5s..."
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo "Jwt token found. Starting Lighthouse..."
|
||||
export RUST_LOG=info
|
||||
lighthouse bn \
|
||||
--network mainnet \
|
||||
--execution-endpoint http://reth:8551 \
|
||||
--execution-jwt /root/.shared_data/jwt.hex \
|
||||
--checkpoint-sync-url https://mainnet.checkpoint.sigp.io \
|
||||
--disable-deposit-contract-sync
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# generate jwt token for reth/lighthouse authentication
|
||||
echo "Installing OpenSSL..."
|
||||
apt update
|
||||
apt install openssl
|
||||
echo "Generating jwt token for lighthouse auth..."
|
||||
openssl rand -hex 32 | tr -d "\n" | tee /root/.shared_data/jwt.hex
|
||||
|
||||
# start reth
|
||||
echo "Starting Reth..."
|
||||
export RUST_LOG=info
|
||||
reth node \
|
||||
--authrpc.jwtsecret /root/.shared_data/jwt.hex \
|
||||
--authrpc.addr 0.0.0.0 \
|
||||
--authrpc.port 8551 \
|
||||
--http \
|
||||
--http.addr 0.0.0.0 \
|
||||
--http.corsdomain * \
|
||||
--http.api eth,web3,net,rpc \
|
||||
--ws \
|
||||
--ws.addr 0.0.0.0 \
|
||||
--ws.origins * \
|
||||
--ws.api eth,web3,net,rpc
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "MobyMask",
|
||||
"relayNodes": [],
|
||||
"peer": {
|
||||
"enableDebugInfo": true
|
||||
}
|
||||
}
|
||||
@@ -33,11 +33,23 @@ else
|
||||
echo "Taking deployed contract details from env"
|
||||
fi
|
||||
|
||||
# Use yq to create config.yml with environment variables
|
||||
yq -n ".address = env(CERC_DEPLOYED_CONTRACT)" > /config/config.yml
|
||||
yq ".watcherUrl = env(CERC_APP_WATCHER_URL)" -i /config/config.yml
|
||||
yq ".chainId = env(CERC_CHAIN_ID)" -i /config/config.yml
|
||||
yq ".relayNodes = strenv(CERC_RELAY_NODES)" -i /config/config.yml
|
||||
yq ".denyMultiaddrs = strenv(CERC_DENY_MULTIADDRS)" -i /config/config.yml
|
||||
cd /app
|
||||
git checkout $CERC_RELEASE
|
||||
|
||||
/scripts/start-serving-app.sh
|
||||
# Export config values in a json file
|
||||
jq --arg address "$CERC_DEPLOYED_CONTRACT" \
|
||||
--argjson chainId "$CERC_CHAIN_ID" \
|
||||
--argjson relayNodes "$CERC_RELAY_NODES" \
|
||||
--argjson denyMultiaddrs "$CERC_DENY_MULTIADDRS" \
|
||||
'.address = $address | .chainId = $chainId | .relayNodes = $relayNodes | .peer.denyMultiaddrs = $denyMultiaddrs' \
|
||||
/app/src/mobymask-app-config.json > /app/${CERC_CONFIG_FILE}
|
||||
|
||||
if [ "${CERC_USE_NPM}" = "true" ]; then
|
||||
npm install
|
||||
REACT_APP_WATCHER_URI="$CERC_APP_WATCHER_URL/graphql" npm run build
|
||||
else
|
||||
yarn install
|
||||
REACT_APP_WATCHER_URI="$CERC_APP_WATCHER_URL/graphql" yarn build
|
||||
fi
|
||||
|
||||
http-server -p 80 /app/build
|
||||
|
||||
@@ -10,7 +10,7 @@ DEFAULT_CERC_RELAY_PEERS=[]
|
||||
DEFAULT_CERC_RELAY_ANNOUNCE_DOMAIN=
|
||||
|
||||
# Base URI for mobymask-app (used for generating invite)
|
||||
DEFAULT_CERC_MOBYMASK_APP_BASE_URI="http://127.0.0.1:3002/#"
|
||||
DEFAULT_CERC_MOBYMASK_APP_BASE_URI="http://127.0.0.1:3004/#"
|
||||
|
||||
# Set to false for disabling watcher peer to send txs to L2
|
||||
DEFAULT_CERC_ENABLE_PEER_L2_TXS=true
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
[server]
|
||||
host = "0.0.0.0"
|
||||
port = 3001
|
||||
mode = "eth_call"
|
||||
kind = "lazy"
|
||||
|
||||
[metrics]
|
||||
host = "127.0.0.1"
|
||||
port = 9000
|
||||
[metrics.gql]
|
||||
port = 9001
|
||||
|
||||
[database]
|
||||
type = "postgres"
|
||||
host = "sushiswap-watcher-db"
|
||||
port = 5432
|
||||
database = "erc20-watcher"
|
||||
username = "vdbm"
|
||||
password = "password"
|
||||
synchronize = true
|
||||
logging = false
|
||||
maxQueryExecutionTime = 100
|
||||
|
||||
[upstream]
|
||||
[upstream.ethServer]
|
||||
rpcProviderEndpoint = "http://lotus-node-1:1234/rpc/v1"
|
||||
rpcClient = true
|
||||
|
||||
[upstream.cache]
|
||||
name = "requests"
|
||||
enabled = false
|
||||
deleteOnStart = false
|
||||
|
||||
[jobQueue]
|
||||
dbConnectionString = "postgres://vdbm:password@sushiswap-watcher-db:5432/erc20-watcher-job-queue"
|
||||
maxCompletionLagInSecs = 300
|
||||
jobDelayInMilliSecs = 100
|
||||
eventsInBatch = 50
|
||||
blockDelayInMilliSecs = 2000
|
||||
@@ -0,0 +1,6 @@
|
||||
# Lotus node config
|
||||
ETH_RPC_ENDPOINT="http://lotus-node-1:1234/rpc/v1"
|
||||
CHAIN_ID=31415926
|
||||
|
||||
# From app/data/config/fixturenet-lotus/fund-account.sh
|
||||
ACCOUNT_PRIVATE_KEY="0xc05fd3613bcd62a4f25e5eba1f464d0b76d74c3f771a7c2f13e26ad6439444b3"
|
||||
@@ -0,0 +1,45 @@
|
||||
[server]
|
||||
host = "0.0.0.0"
|
||||
port = 3004
|
||||
# Use mode demo when running watcher locally.
|
||||
# Mode demo whitelists all tokens so that entity values get updated.
|
||||
mode = "demo"
|
||||
|
||||
[database]
|
||||
type = "postgres"
|
||||
host = "sushiswap-watcher-db"
|
||||
port = 5432
|
||||
database = "sushi-info-watcher"
|
||||
username = "vdbm"
|
||||
password = "password"
|
||||
synchronize = true
|
||||
logging = false
|
||||
maxQueryExecutionTime = 100
|
||||
|
||||
[upstream]
|
||||
[upstream.ethServer]
|
||||
rpcProviderEndpoint = "http://lotus-node-1:1234/rpc/v1"
|
||||
rpcClient = true
|
||||
|
||||
[upstream.cache]
|
||||
name = "requests"
|
||||
enabled = false
|
||||
deleteOnStart = false
|
||||
|
||||
[upstream.uniWatcher]
|
||||
gqlEndpoint = "http://sushi-watcher-server:3003/graphql"
|
||||
gqlSubscriptionEndpoint = "ws://sushi-watcher-server:3003/graphql"
|
||||
|
||||
[upstream.tokenWatcher]
|
||||
gqlEndpoint = "http://erc20-watcher-server:3001/graphql"
|
||||
gqlSubscriptionEndpoint = "ws://erc20-watcher-server:3001/graphql"
|
||||
|
||||
[jobQueue]
|
||||
dbConnectionString = "postgres://vdbm:password@sushiswap-watcher-db:5432/sushi-info-watcher-job-queue"
|
||||
maxCompletionLagInSecs = 300
|
||||
jobDelayInMilliSecs = 1000
|
||||
eventsInBatch = 50
|
||||
subgraphEventsOrder = true
|
||||
blockDelayInMilliSecs = 2000
|
||||
prefetchBlocksInMem = false
|
||||
prefetchBlockCount = 10
|
||||
@@ -0,0 +1,90 @@
|
||||
[server]
|
||||
host = "0.0.0.0"
|
||||
port = 3004
|
||||
mode = "demo"
|
||||
kind = "active"
|
||||
|
||||
# Checkpointing state.
|
||||
checkpointing = true
|
||||
|
||||
# Checkpoint interval in number of blocks.
|
||||
checkpointInterval = 50000
|
||||
|
||||
# Enable state creation
|
||||
enableState = false
|
||||
|
||||
# Max block range for which to return events in eventsInRange GQL query.
|
||||
# Use -1 for skipping check on block range.
|
||||
maxEventsBlockRange = 1000
|
||||
|
||||
# Interval in number of blocks at which to clear entities cache.
|
||||
clearEntitiesCacheInterval = 1000
|
||||
|
||||
# Boolean to skip updating entity fields required in state creation and not required in the frontend.
|
||||
skipStateFieldsUpdate = false
|
||||
|
||||
# Boolean to load GQL query nested entity relations sequentially.
|
||||
loadRelationsSequential = false
|
||||
|
||||
# Max GQL API requests to process simultaneously (defaults to 1).
|
||||
maxSimultaneousRequests = 1
|
||||
|
||||
# GQL cache settings
|
||||
[server.gqlCache]
|
||||
enabled = true
|
||||
|
||||
# Max in-memory cache size (in bytes) (default 8 MB)
|
||||
# maxCacheSize
|
||||
|
||||
# GQL cache-control max-age settings (in seconds)
|
||||
maxAge = 15
|
||||
timeTravelMaxAge = 86400 # 1 day
|
||||
|
||||
[metrics]
|
||||
host = "0.0.0.0"
|
||||
port = 9002
|
||||
[metrics.gql]
|
||||
port = 9003
|
||||
|
||||
[database]
|
||||
type = "postgres"
|
||||
host = "sushiswap-watcher-db"
|
||||
port = 5432
|
||||
database = "sushi-info-watcher"
|
||||
username = "vdbm"
|
||||
password = "password"
|
||||
synchronize = true
|
||||
logging = false
|
||||
maxQueryExecutionTime = 100
|
||||
|
||||
[database.extra]
|
||||
# maximum number of clients the pool should contain
|
||||
max = 20
|
||||
|
||||
[upstream]
|
||||
[upstream.ethServer]
|
||||
rpcProviderEndpoint = "http://lotus-node-1:1234/rpc/v1"
|
||||
rpcClient = true
|
||||
|
||||
[upstream.cache]
|
||||
name = "requests"
|
||||
enabled = false
|
||||
deleteOnStart = false
|
||||
|
||||
[upstream.uniWatcher]
|
||||
gqlEndpoint = "http://sushi-watcher-server:3003/graphql"
|
||||
gqlSubscriptionEndpoint = "ws://sushi-watcher-server:3003/graphql"
|
||||
|
||||
[upstream.tokenWatcher]
|
||||
gqlEndpoint = "http://erc20-watcher-server:3001/graphql"
|
||||
gqlSubscriptionEndpoint = "ws://erc20-watcher-server:3001/graphql"
|
||||
|
||||
[jobQueue]
|
||||
dbConnectionString = "postgres://vdbm:password@sushiswap-watcher-db:5432/sushi-info-watcher-job-queue"
|
||||
maxCompletionLagInSecs = 300
|
||||
jobDelayInMilliSecs = 1000
|
||||
eventsInBatch = 50
|
||||
subgraphEventsOrder = true
|
||||
blockDelayInMilliSecs = 2000
|
||||
prefetchBlocksInMem = false
|
||||
prefetchBlockCount = 10
|
||||
@@ -0,0 +1,34 @@
|
||||
[server]
|
||||
host = "0.0.0.0"
|
||||
port = 3003
|
||||
|
||||
[database]
|
||||
type = "postgres"
|
||||
host = "sushiswap-watcher-db"
|
||||
port = 5432
|
||||
database = "sushi-watcher"
|
||||
username = "vdbm"
|
||||
password = "password"
|
||||
synchronize = true
|
||||
logging = false
|
||||
maxQueryExecutionTime = 100
|
||||
|
||||
[upstream]
|
||||
[upstream.ethServer]
|
||||
rpcProviderEndpoint = "http://lotus-node-1:1234/rpc/v1"
|
||||
rpcClient = true
|
||||
|
||||
[upstream.cache]
|
||||
name = "requests"
|
||||
enabled = false
|
||||
deleteOnStart = false
|
||||
|
||||
[jobQueue]
|
||||
dbConnectionString = "postgres://vdbm:password@sushiswap-watcher-db:5432/sushi-watcher-job-queue"
|
||||
maxCompletionLagInSecs = 300
|
||||
jobDelayInMilliSecs = 0
|
||||
eventsInBatch = 50
|
||||
lazyUpdateBlockProgress = true
|
||||
blockDelayInMilliSecs = 2000
|
||||
prefetchBlocksInMem = false
|
||||
prefetchBlockCount = 10
|
||||
@@ -0,0 +1,41 @@
|
||||
[server]
|
||||
host = "0.0.0.0"
|
||||
port = 3003
|
||||
kind = "active"
|
||||
|
||||
[metrics]
|
||||
host = "0.0.0.0"
|
||||
port = 9000
|
||||
[metrics.gql]
|
||||
port = 9001
|
||||
|
||||
[database]
|
||||
type = "postgres"
|
||||
host = "sushiswap-watcher-db"
|
||||
port = 5432
|
||||
database = "sushi-watcher"
|
||||
username = "vdbm"
|
||||
password = "password"
|
||||
synchronize = true
|
||||
logging = false
|
||||
maxQueryExecutionTime = 100
|
||||
|
||||
[upstream]
|
||||
[upstream.ethServer]
|
||||
rpcProviderEndpoint = "http://lotus-node-1:1234/rpc/v1"
|
||||
rpcClient = true
|
||||
|
||||
[upstream.cache]
|
||||
name = "requests"
|
||||
enabled = false
|
||||
deleteOnStart = false
|
||||
|
||||
[jobQueue]
|
||||
dbConnectionString = "postgres://vdbm:password@sushiswap-watcher-db:5432/sushi-watcher-job-queue"
|
||||
maxCompletionLagInSecs = 300
|
||||
jobDelayInMilliSecs = 0
|
||||
eventsInBatch = 50
|
||||
lazyUpdateBlockProgress = true
|
||||
blockDelayInMilliSecs = 2000
|
||||
prefetchBlocksInMem = false
|
||||
prefetchBlockCount = 10
|
||||
@@ -0,0 +1,27 @@
|
||||
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||
|
||||
FROM golang:1.20-alpine as builder
|
||||
|
||||
RUN apk add --no-cache python3 py3-pip
|
||||
|
||||
COPY genesis /opt/genesis
|
||||
|
||||
# Install ethereum-genesis-generator tools
|
||||
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
|
||||
# web3==5.24.0 used by el-gen is broken on python 3.11
|
||||
RUN pip3 install --upgrade "web3==6.5.0"
|
||||
|
||||
# Build genesis config
|
||||
RUN apk add --no-cache make bash envsubst jq
|
||||
RUN cd /opt/genesis && make genesis-el
|
||||
|
||||
# Snag the genesis block info.
|
||||
RUN go install github.com/cerc-io/eth-dump-genblock@latest
|
||||
RUN eth-dump-genblock /opt/genesis/build/el/geth.json > /opt/genesis/build/el/genesis_block.json
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
COPY --from=builder /opt/genesis /opt/genesis
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build cerc/fixturenet-eth-genesis
|
||||
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
docker build -t cerc/fixturenet-eth-genesis:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} $SCRIPT_DIR
|
||||
@@ -1,39 +1,21 @@
|
||||
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||
|
||||
# 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/fixturenet-eth-genesis:local as fnetgen
|
||||
FROM cerc/go-ethereum:local as geth
|
||||
|
||||
# Using the same golang image as used to build geth: https://github.com/cerc-io/go-ethereum/blob/HEAD/Dockerfile
|
||||
FROM golang:1.20-alpine as delve
|
||||
RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
|
||||
FROM alpine:3.17
|
||||
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=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 apk add --no-cache bash wget python3 bind-tools postgresql-client
|
||||
|
||||
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
|
||||
COPY --from=delve /go/bin/dlv /usr/local/bin/
|
||||
COPY --from=geth /usr/local/bin/geth /usr/local/bin/
|
||||
COPY --from=fnetgen /opt/genesis /opt/testnet
|
||||
|
||||
COPY --from=geth /usr/local/bin/geth /usr/local/bin/
|
||||
|
||||
# Snag the genesis block info.
|
||||
# Initialize the geth db with our config
|
||||
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"]
|
||||
|
||||
@@ -7,11 +7,12 @@ fi
|
||||
ETHERBASE=`cat /opt/testnet/build/el/accounts.csv | head -1 | cut -d',' -f2`
|
||||
NETWORK_ID=`cat /opt/testnet/el/el-config.yaml | grep 'chain_id' | awk '{ print $2 }'`
|
||||
NETRESTRICT=`ip addr | grep inet | grep -v '127.0' | awk '{print $2}'`
|
||||
CERC_ETH_DATADIR="${CERC_ETH_DATADIR:-$HOME/ethdata}"
|
||||
CERC_PLUGINS_DIR="${CERC_PLUGINS_DIR:-/usr/local/lib/plugeth}"
|
||||
|
||||
HOME_DIR=`pwd`
|
||||
cd /opt/testnet/build/el
|
||||
python3 -m http.server 9898 &
|
||||
cd $HOME_DIR
|
||||
cd $HOME
|
||||
|
||||
START_CMD="geth"
|
||||
if [ "true" == "$CERC_REMOTE_DEBUG" ] && [ -x "/usr/local/bin/dlv" ]; then
|
||||
@@ -34,7 +35,7 @@ trap 'cleanup' SIGINT SIGTERM
|
||||
|
||||
if [ "true" == "$RUN_BOOTNODE" ]; then
|
||||
$START_CMD \
|
||||
--datadir=~/ethdata \
|
||||
--datadir="${CERC_ETH_DATADIR}" \
|
||||
--nodekeyhex="${BOOTNODE_KEY}" \
|
||||
--nodiscover \
|
||||
--ipcdisable \
|
||||
@@ -82,7 +83,7 @@ else
|
||||
fi
|
||||
fi
|
||||
done
|
||||
STATEDIFF_OPTS="--statediff=true \
|
||||
STATEDIFF_OPTS="--statediff \
|
||||
--statediff.db.host=$CERC_STATEDIFF_DB_HOST \
|
||||
--statediff.db.name=$CERC_STATEDIFF_DB_NAME \
|
||||
--statediff.db.nodeid=$CERC_STATEDIFF_DB_NODE_ID \
|
||||
@@ -94,10 +95,15 @@ else
|
||||
--statediff.waitforsync=true \
|
||||
--statediff.workers=${CERC_STATEDIFF_WORKERS:-1} \
|
||||
--statediff.writing=true"
|
||||
|
||||
if [ -d "${CERC_PLUGINS_DIR}" ]; then
|
||||
# With plugeth, we separate the statediff options by prefixing with ' -- '
|
||||
STATEDIFF_OPTS="--pluginsdir "${CERC_PLUGINS_DIR}" -- ${STATEDIFF_OPTS}"
|
||||
fi
|
||||
fi
|
||||
|
||||
$START_CMD \
|
||||
--datadir=~/ethdata \
|
||||
--datadir="${CERC_ETH_DATADIR}" \
|
||||
--bootnodes="${ENODE}" \
|
||||
--allow-insecure-unlock \
|
||||
--http \
|
||||
@@ -124,8 +130,9 @@ else
|
||||
--metrics \
|
||||
--metrics.addr="0.0.0.0" \
|
||||
--verbosity=${CERC_GETH_VERBOSITY:-3} \
|
||||
--vmodule="${CERC_GETH_VMODULE:-statediff/*=5}" \
|
||||
--miner.etherbase="${ETHERBASE}" ${STATEDIFF_OPTS} \
|
||||
--log.vmodule="${CERC_GETH_VMODULE:-statediff/*=5}" \
|
||||
--miner.etherbase="${ETHERBASE}" \
|
||||
${STATEDIFF_OPTS} \
|
||||
&
|
||||
|
||||
geth_pid=$!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM cerc/lighthouse-cli:local AS lcli
|
||||
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||
FROM cerc/fixturenet-eth-geth:local AS fnetgeth
|
||||
FROM cerc/fixturenet-eth-genesis:local AS fnetgen
|
||||
|
||||
FROM cerc/lighthouse:local
|
||||
|
||||
@@ -19,8 +19,8 @@ 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
|
||||
COPY --from=fnetgen /opt/genesis/el /opt/testnet/el
|
||||
COPY --from=fnetgen /opt/genesis/build/el /opt/testnet/build/el
|
||||
|
||||
RUN cd /opt/testnet && make genesis-cl
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ EXECUTION_ENDPOINT=${EXECUTION_ENDPOINT:-http://localhost:8551}
|
||||
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_BLOCK_HASH=${ETH1_BLOCK_HASH:-`cat $ETH1_GENESIS_BLOCK_JSON | jq -r '.result.hash' | cut -d'x' -f2`}
|
||||
ETH1_BLOCK_HASH=${ETH1_BLOCK_HASH:-`cat $ETH1_GENESIS_BLOCK_JSON | jq -r '.hash' | cut -d'x' -f2`}
|
||||
|
||||
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'`}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
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"]
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,34 +0,0 @@
|
||||
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"]
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,40 +1,25 @@
|
||||
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||
FROM cerc/fixturenet-eth-genesis:local as fnetgen
|
||||
|
||||
FROM golang:1.19.4-bullseye AS delve
|
||||
# Using the same golang image as used to build geth: https://github.com/cerc-io/go-ethereum/blob/HEAD/Dockerfile
|
||||
FROM golang:1.20-alpine 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/*
|
||||
FROM cerc/plugeth-statediff:local as statediff
|
||||
# FIXME: fork of plugeth, use stock after upstreaming patches
|
||||
FROM cerc/plugeth:local as geth
|
||||
|
||||
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
|
||||
FROM alpine:3.17
|
||||
|
||||
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
|
||||
RUN apk add --no-cache bash wget python3 bind-tools postgresql-client
|
||||
|
||||
COPY genesis /opt/testnet
|
||||
COPY run-el.sh /opt/testnet/run.sh
|
||||
|
||||
RUN cd /opt/testnet && make genesis-el
|
||||
COPY --from=delve /go/bin/dlv /usr/local/bin/
|
||||
COPY --from=geth /usr/local/bin/geth /usr/local/bin/
|
||||
COPY --from=fnetgen /opt/genesis /opt/testnet
|
||||
COPY --from=statediff /usr/local/lib/statediff.so /usr/local/lib/plugeth/
|
||||
|
||||
# Initialize the geth db with our config
|
||||
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"]
|
||||
|
||||
@@ -6,10 +6,6 @@ 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
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build cerc/go-opera
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
|
||||
# Repo's dockerfile gives build error because it's hardcoded for go 1.17; go 1.19 is required
|
||||
sed -i 's/FROM golang:1\.[0-9]*-alpine as builder/FROM golang:1.19-alpine as builder/' ${CERC_REPO_BASE_DIR}/go-opera/docker/Dockerfile.opera
|
||||
|
||||
docker build -f ${CERC_REPO_BASE_DIR}/go-opera/docker/Dockerfile.opera -t cerc/go-opera:local ${build_command_args} ${CERC_REPO_BASE_DIR}/go-opera
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build a local version of the graphprotocol/graph-node image (among reasons: the upstream image is not built for arm)
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
docker build -t cerc/graph-node:local -f ${CERC_REPO_BASE_DIR}/graph-node/docker/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/graph-node
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build the lasso image
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
docker build -t cerc/lasso:local -f ${CERC_REPO_BASE_DIR}/lasso/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/lasso
|
||||
@@ -1,7 +1,7 @@
|
||||
ARG TAG_SUFFIX="-modern"
|
||||
FROM sigp/lighthouse:v4.1.0${TAG_SUFFIX}
|
||||
FROM sigp/lighthouse:v4.3.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 wget -y;
|
||||
|
||||
WORKDIR /root/
|
||||
ADD start-lighthouse.sh .
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#####################################
|
||||
FROM golang:1.19.7-buster AS lotus-builder
|
||||
FROM golang:1.19.12-bullseye AS lotus-builder
|
||||
MAINTAINER Lotus Development Team
|
||||
|
||||
RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev
|
||||
@@ -59,7 +59,7 @@ COPY --from=lotus-builder /lib/*/libgcc_s.so.1 /lib/
|
||||
COPY --from=lotus-builder /lib/*/libutil.so.1 /lib/
|
||||
COPY --from=lotus-builder /usr/lib/*/libltdl.so.7 /lib/
|
||||
COPY --from=lotus-builder /usr/lib/*/libnuma.so.1 /lib/
|
||||
COPY --from=lotus-builder /usr/lib/*/libhwloc.so.5 /lib/
|
||||
COPY --from=lotus-builder /usr/lib/*/libhwloc.so.* /lib/
|
||||
COPY --from=lotus-builder /usr/lib/*/libOpenCL.so.1 /lib/
|
||||
|
||||
RUN useradd -r -u 532 -U fc \
|
||||
@@ -98,6 +98,9 @@ CMD ["-help"]
|
||||
#####################################
|
||||
FROM lotus-base AS lotus-all-in-one
|
||||
|
||||
# Install netcat for healthcheck
|
||||
RUN apt-get update && apt-get install -y netcat
|
||||
|
||||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
||||
ENV LOTUS_MINER_PATH /var/lib/lotus-miner
|
||||
ENV LOTUS_PATH /var/lib/lotus
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
# Per lotus docs, 'releases' branch always contains latest stable release
|
||||
git -C ${CERC_REPO_BASE_DIR}/lotus checkout releases
|
||||
# Use a release version tag to match the modified Dockerfile replaced in next step
|
||||
git -C ${CERC_REPO_BASE_DIR}/lotus checkout v1.23.3
|
||||
|
||||
# Replace repo's Dockerfile with modified one
|
||||
cp ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/lotus/Dockerfile
|
||||
|
||||
@@ -6,9 +6,6 @@ FROM node:${VARIANT}
|
||||
ARG USERNAME=node
|
||||
ARG NPM_GLOBAL=/usr/local/share/npm-global
|
||||
|
||||
# This container pulls npm package from a registry configured via env var
|
||||
ARG CERC_NPM_REGISTRY_URL
|
||||
|
||||
# Add NPM global to PATH.
|
||||
ENV PATH=${NPM_GLOBAL}/bin:${PATH}
|
||||
# Prevents npm from printing version warnings
|
||||
@@ -33,28 +30,14 @@ RUN \
|
||||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get -y install --no-install-recommends jq bash netcat
|
||||
|
||||
# We do this to get a yq binary from the published container, for the correct architecture we're building here
|
||||
COPY --from=docker.io/mikefarah/yq:latest /usr/bin/yq /usr/local/bin/yq
|
||||
|
||||
RUN mkdir -p /scripts
|
||||
COPY ./apply-webapp-config.sh /scripts
|
||||
COPY ./start-serving-app.sh /scripts
|
||||
|
||||
# Configure the local npm registry
|
||||
RUN npm config set @cerc-io:registry ${CERC_NPM_REGISTRY_URL}
|
||||
|
||||
RUN mkdir -p /config
|
||||
|
||||
# Install simple web server for now (use nginx perhaps later)
|
||||
RUN yarn global add http-server
|
||||
|
||||
# Globally install both versions of the payload web app package
|
||||
# Install old version of MobyMask web app
|
||||
RUN yarn global add @cerc-io/mobymask-ui@0.1.4
|
||||
# Install the LXDAO version of MobyMask web app
|
||||
RUN yarn global add @cerc-io/mobymask-ui-lxdao@npm:@cerc-io/mobymask-ui@0.1.4-lxdao-0.1.1
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN npm install
|
||||
|
||||
# Expose port for http
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["/scripts/start-serving-app.sh"]
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
if [[ $# -ne 3 ]]; then
|
||||
echo "Illegal number of parameters" >&2
|
||||
exit 1
|
||||
fi
|
||||
config_file_name=$1
|
||||
webapp_files_dir=$2
|
||||
config_prefix=$3
|
||||
if ! [[ -f ${config_file_name} ]]; then
|
||||
echo "Config file ${config_file_name} does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! [[ -d ${webapp_files_dir} ]]; then
|
||||
echo "Webapp directory ${webapp_files_dir} does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
# First some magic using sed to translate our yaml config file into an array of key value pairs like:
|
||||
# ${config_prefix}<path-through-objects>=<value>
|
||||
# sed "s/'//g" is used to remove single quote for relayNodes value
|
||||
readarray -t config_kv_pair_array < <( sed -E 's/([^:]+):\s*(.*)/\1=\2/g' ${config_file_name} | sed "s/'//g" | sed "s/^/${config_prefix}_/" )
|
||||
declare -p config_kv_pair_array
|
||||
# Then iterate over that kv array making the template substitution in our web app files
|
||||
for kv_pair_string in "${config_kv_pair_array[@]}"
|
||||
do
|
||||
kv_pair=(${kv_pair_string//=/ })
|
||||
template_string_to_replace=${kv_pair[0]}
|
||||
template_value_to_substitute=${kv_pair[1]}
|
||||
# Run find and sed to do the substitution of one variable over all files
|
||||
# See: https://stackoverflow.com/a/21479607/1701505
|
||||
echo "Substituting: ${template_string_to_replace} = ${template_value_to_substitute}"
|
||||
|
||||
# TODO: Pass keys to be replaced without double quotes
|
||||
if [[ "$template_string_to_replace" =~ ^${config_prefix}_(relayNodes|chainId|denyMultiaddrs)$ ]]; then
|
||||
find ${webapp_files_dir} -type f -exec sed -i 's#"'"${template_string_to_replace}"'"#'"${template_value_to_substitute}"'#g' {} +
|
||||
else
|
||||
# Note: we do not escape our strings, on the expectation they do not container the '#' char.
|
||||
find ${webapp_files_dir} -type f -exec sed -i 's#'${template_string_to_replace}'#'${template_value_to_substitute}'#g' {} +
|
||||
fi
|
||||
done
|
||||
@@ -8,5 +8,4 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
CERC_NPM_REGISTRY_URL="https://git.vdb.to/api/packages/cerc-io/npm/"
|
||||
|
||||
docker build -t cerc/mobymask-ui:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile \
|
||||
--build-arg CERC_NPM_REGISTRY_URL ${SCRIPT_DIR}
|
||||
docker build -t cerc/mobymask-ui:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/mobymask-ui
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# TODO: Don't hard wire this:
|
||||
webapp_files_dir="/usr/local/share/.config/yarn/global/node_modules/${CERC_BUILD_DIR}"
|
||||
/scripts/apply-webapp-config.sh /config/config.yml ${webapp_files_dir} MOBYMASK_HOSTED_CONFIG
|
||||
http-server -p 80 ${webapp_files_dir}
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build cerc/plugeth-statediff
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
docker build -t cerc/plugeth-statediff:local ${build_command_args} ${CERC_REPO_BASE_DIR}/plugeth-statediff
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build cerc/plugeth
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
docker build -t cerc/plugeth:local ${build_command_args} ${CERC_REPO_BASE_DIR}/plugeth
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build cerc/go-opera
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
|
||||
docker build -t cerc/reth:local ${build_command_args} ${CERC_REPO_BASE_DIR}/reth
|
||||
@@ -0,0 +1,14 @@
|
||||
FROM node:18.15.0-alpine3.16
|
||||
|
||||
RUN apk --update --no-cache add git python3 alpine-sdk bash
|
||||
RUN curl -L https://unpkg.com/@pnpm/self-installer | node
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN echo "Installing dependencies..." && \
|
||||
pnpm install
|
||||
|
||||
# Keep container running for commands to be executed
|
||||
CMD ["tail", "-f"]
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Build cerc/sushiswap-v3-core
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
docker build -t cerc/sushiswap-v3-core:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/sushiswap-v3-core
|
||||
@@ -0,0 +1,13 @@
|
||||
FROM node:18.15.0-alpine3.16
|
||||
|
||||
RUN apk --update --no-cache add git python3 alpine-sdk bash
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN echo "Installing dependencies..." && \
|
||||
yarn install
|
||||
|
||||
# Keep container running for commands to be executed
|
||||
CMD ["tail", "-f"]
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Build cerc/sushiswap-v3-periphery
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
docker build -t cerc/sushiswap-v3-periphery:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/sushiswap-v3-periphery
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user