Compare commits
40 Commits
ng-deny-mu
...
main
| Author | SHA1 | Date |
|---|---|---|
|
|
ce966f1baa | |
|
|
db4728a9e3 | |
|
|
7ca7bcc952 | |
|
|
32f8d65bb8 | |
|
|
d19b9a65b9 | |
|
|
98e1d120cc | |
|
|
26ff7a969c | |
|
|
a8e198ad55 | |
|
|
f1a626ddf5 | |
|
|
ff616db4ad | |
|
|
9880b48b78 | |
|
|
23a336020c | |
|
|
605db8a4d2 | |
|
|
6ec55ba460 | |
|
|
938f51ef8c | |
|
|
6d620ba9c2 | |
|
|
0c4c128465 | |
|
|
97c1ae1c43 | |
|
|
ec6b5439f4 | |
|
|
1d8f252a51 | |
|
|
161665ef72 | |
|
|
9c5f6469ff | |
|
|
85225c72d7 | |
|
|
223d1171e8 | |
|
|
1e38e16550 | |
|
|
dddae8cc7a | |
|
|
aa702737ef | |
|
|
c9155eafd2 | |
|
|
1ffc6b1687 | |
|
|
87c25dfb5e | |
|
|
0691c22db4 | |
|
|
5c7d445500 | |
|
|
a93fa93d26 | |
|
|
1852d7d4c1 | |
|
|
fce41994a3 | |
|
|
a5d3d6bae7 | |
|
|
8add4671c0 | |
|
|
b1b1464205 | |
|
|
fbe901a0fb | |
|
|
a9558aa874 |
|
|
@ -0,0 +1,39 @@
|
||||||
|
name: Deploy Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: '*'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- ci-test
|
||||||
|
|
||||||
|
# Needed until we can incorporate docker startup into the executor container
|
||||||
|
env:
|
||||||
|
DOCKER_HOST: unix:///var/run/dind.sock
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: "Run deploy test suite"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Clone project repository"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: "Install Python"
|
||||||
|
uses: cerc-io/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
- name: "Print Python version"
|
||||||
|
run: python3 --version
|
||||||
|
- name: "Install shiv"
|
||||||
|
run: pip install shiv
|
||||||
|
- name: "Generate build version file"
|
||||||
|
run: ./scripts/create_build_tag_file.sh
|
||||||
|
- name: "Build local shiv package"
|
||||||
|
run: ./scripts/build_shiv_package.sh
|
||||||
|
- name: Start dockerd # Also needed until we can incorporate into the executor
|
||||||
|
run: |
|
||||||
|
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
||||||
|
sleep 5
|
||||||
|
- name: "Run deploy tests"
|
||||||
|
run: ./tests/deploy/run-deploy-test.sh
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
name: Integration Test
|
name: Smoke Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
name: Deploy Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: '*'
|
||||||
|
push:
|
||||||
|
branches: '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: "Run deploy test suite"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Clone project repository"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: "Install Python"
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
- name: "Print Python version"
|
||||||
|
run: python3 --version
|
||||||
|
- name: "Install shiv"
|
||||||
|
run: pip install shiv
|
||||||
|
- name: "Generate build version file"
|
||||||
|
run: ./scripts/create_build_tag_file.sh
|
||||||
|
- name: "Build local shiv package"
|
||||||
|
run: ./scripts/build_shiv_package.sh
|
||||||
|
- name: "Run deploy tests"
|
||||||
|
run: ./tests/deploy/run-deploy-test.sh
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
name: Test
|
name: Smoke Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,4 @@ __pycache__
|
||||||
*~
|
*~
|
||||||
package
|
package
|
||||||
app/data/build_tag.txt
|
app/data/build_tag.txt
|
||||||
|
build
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
# Stack Orchestrator
|
# Stack Orchestrator
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Stack Orchestrator allows building and deployment of a Laconic Stack on a single machine with minimial prerequisites. It is a Python3 CLI tool that runs on any OS with Python3 and Docker. The following diagram summarizes the relevant repositories in the Laconic Stack - and the relationship to Stack Orchestrator.
|
Stack Orchestrator allows building and deployment of a Laconic Stack on a single machine with minimial prerequisites. It is a Python3 CLI tool that runs on any OS with Python3 and Docker. The following diagram summarizes the relevant repositories in the Laconic Stack - and the relationship to Stack Orchestrator.
|
||||||
|
|
||||||

|

|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||||
"CERC_CONTAINER_BASE_DIR": container_build_dir,
|
"CERC_CONTAINER_BASE_DIR": container_build_dir,
|
||||||
"CERC_HOST_UID": f"{os.getuid()}",
|
"CERC_HOST_UID": f"{os.getuid()}",
|
||||||
"CERC_HOST_GID": f"{os.getgid()}",
|
"CERC_HOST_GID": f"{os.getgid()}",
|
||||||
"DOCKER_BUILDKIT": "0"
|
"DOCKER_BUILDKIT": config("DOCKER_BUILDKIT", default="0")
|
||||||
}
|
}
|
||||||
container_build_env.update({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
|
container_build_env.update({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
|
||||||
container_build_env.update({"CERC_FORCE_REBUILD": "true"} if force_rebuild else {})
|
container_build_env.update({"CERC_FORCE_REBUILD": "true"} if force_rebuild else {})
|
||||||
|
|
@ -115,7 +115,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||||
# TODO: make this less of a hack -- should be specified in some metadata somewhere
|
# TODO: make this less of a hack -- should be specified in some metadata somewhere
|
||||||
# Check if we have a repo for this container. If not, set the context dir to the container-build subdir
|
# Check if we have a repo for this container. If not, set the context dir to the container-build subdir
|
||||||
repo_full_path = os.path.join(dev_root_path, repo_dir)
|
repo_full_path = os.path.join(dev_root_path, repo_dir)
|
||||||
repo_dir_or_build_dir = repo_dir if os.path.exists(repo_full_path) else build_dir
|
repo_dir_or_build_dir = repo_full_path if os.path.exists(repo_full_path) else build_dir
|
||||||
build_command = os.path.join(container_build_dir, "default-build.sh") + f" {container}:local {repo_dir_or_build_dir}"
|
build_command = os.path.join(container_build_dir, "default-build.sh") + f" {container}:local {repo_dir_or_build_dir}"
|
||||||
if not dry_run:
|
if not dry_run:
|
||||||
if verbose:
|
if verbose:
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ version: '3.7'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
fixturenet-eth-bootnode-geth:
|
fixturenet-eth-bootnode-geth:
|
||||||
|
restart: always
|
||||||
hostname: fixturenet-eth-bootnode-geth
|
hostname: fixturenet-eth-bootnode-geth
|
||||||
env_file:
|
env_file:
|
||||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
|
|
@ -15,12 +16,13 @@ services:
|
||||||
- "30303"
|
- "30303"
|
||||||
|
|
||||||
fixturenet-eth-geth-1:
|
fixturenet-eth-geth-1:
|
||||||
|
restart: always
|
||||||
hostname: fixturenet-eth-geth-1
|
hostname: fixturenet-eth-geth-1
|
||||||
cap_add:
|
cap_add:
|
||||||
- SYS_PTRACE
|
- SYS_PTRACE
|
||||||
environment:
|
environment:
|
||||||
CERC_REMOTE_DEBUG: "true"
|
CERC_REMOTE_DEBUG: "true"
|
||||||
CERC_RUN_STATEDIFF: "detect"
|
CERC_RUN_STATEDIFF: ${CERC_RUN_STATEDIFF:-detect}
|
||||||
CERC_STATEDIFF_DB_NODE_ID: 1
|
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
env_file:
|
env_file:
|
||||||
|
|
@ -42,6 +44,7 @@ services:
|
||||||
- "6060"
|
- "6060"
|
||||||
|
|
||||||
fixturenet-eth-geth-2:
|
fixturenet-eth-geth-2:
|
||||||
|
restart: always
|
||||||
hostname: fixturenet-eth-geth-2
|
hostname: fixturenet-eth-geth-2
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "nc", "-v", "localhost", "8545"]
|
test: ["CMD", "nc", "-v", "localhost", "8545"]
|
||||||
|
|
@ -60,12 +63,14 @@ services:
|
||||||
- fixturenet_eth_geth_2_data:/root/ethdata
|
- fixturenet_eth_geth_2_data:/root/ethdata
|
||||||
|
|
||||||
fixturenet-eth-bootnode-lighthouse:
|
fixturenet-eth-bootnode-lighthouse:
|
||||||
|
restart: always
|
||||||
hostname: fixturenet-eth-bootnode-lighthouse
|
hostname: fixturenet-eth-bootnode-lighthouse
|
||||||
environment:
|
environment:
|
||||||
RUN_BOOTNODE: "true"
|
RUN_BOOTNODE: "true"
|
||||||
image: cerc/fixturenet-eth-lighthouse:local
|
image: cerc/fixturenet-eth-lighthouse:local
|
||||||
|
|
||||||
fixturenet-eth-lighthouse-1:
|
fixturenet-eth-lighthouse-1:
|
||||||
|
restart: always
|
||||||
hostname: fixturenet-eth-lighthouse-1
|
hostname: fixturenet-eth-lighthouse-1
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
|
||||||
|
|
@ -91,6 +96,7 @@ services:
|
||||||
- "8001"
|
- "8001"
|
||||||
|
|
||||||
fixturenet-eth-lighthouse-2:
|
fixturenet-eth-lighthouse-2:
|
||||||
|
restart: always
|
||||||
hostname: fixturenet-eth-lighthouse-2
|
hostname: fixturenet-eth-lighthouse-2
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
version: "3.2"
|
|
||||||
services:
|
services:
|
||||||
laconicd:
|
laconicd:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: cerc/laconicd:local
|
image: cerc/laconicd:local
|
||||||
command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"]
|
command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
|
# The cosmos-sdk node's database directory:
|
||||||
|
- laconicd-data:/root/.laconicd/data
|
||||||
# TODO: look at folding these scripts into the container
|
# TODO: look at folding these scripts into the container
|
||||||
- ../config/fixturenet-laconicd/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
|
- ../config/fixturenet-laconicd/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
|
||||||
- ../config/fixturenet-laconicd/export-mykey.sh:/docker-entrypoint-scripts.d/export-mykey.sh
|
- ../config/fixturenet-laconicd/export-mykey.sh:/docker-entrypoint-scripts.d/export-mykey.sh
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
|
||||||
|
lotus-miner:
|
||||||
|
hostname: lotus-miner
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-lotus/lotus-env.env
|
||||||
|
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
|
||||||
|
- 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"
|
||||||
|
- "2345"
|
||||||
|
- "3456"
|
||||||
|
- "1777"
|
||||||
|
|
||||||
|
lotus-node-1:
|
||||||
|
hostname: lotus-node-1
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-lotus/lotus-env.env
|
||||||
|
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-shared:/root/.lotus-shared
|
||||||
|
depends_on:
|
||||||
|
lotus-miner:
|
||||||
|
condition: service_healthy
|
||||||
|
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
||||||
|
ports:
|
||||||
|
- "1234"
|
||||||
|
- "2345"
|
||||||
|
- "3456"
|
||||||
|
- "1777"
|
||||||
|
|
||||||
|
lotus-node-2:
|
||||||
|
hostname: lotus-node-2
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-lotus/lotus-env.env
|
||||||
|
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-shared:/root/.lotus-shared
|
||||||
|
depends_on:
|
||||||
|
lotus-miner:
|
||||||
|
condition: service_healthy
|
||||||
|
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
||||||
|
ports:
|
||||||
|
- "1234"
|
||||||
|
- "2345"
|
||||||
|
- "3456"
|
||||||
|
- "1777"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
lotus-shared:
|
||||||
|
|
@ -5,6 +5,7 @@ services:
|
||||||
# Creates / updates the configuration for L1 contracts deployment
|
# Creates / updates the configuration for L1 contracts deployment
|
||||||
# Deploys the L1 smart contracts (outputs to volume l1_deployment)
|
# Deploys the L1 smart contracts (outputs to volume l1_deployment)
|
||||||
fixturenet-optimism-contracts:
|
fixturenet-optimism-contracts:
|
||||||
|
restart: on-failure
|
||||||
hostname: fixturenet-optimism-contracts
|
hostname: fixturenet-optimism-contracts
|
||||||
image: cerc/optimism-contracts:local
|
image: cerc/optimism-contracts:local
|
||||||
env_file:
|
env_file:
|
||||||
|
|
@ -35,6 +36,7 @@ services:
|
||||||
|
|
||||||
# Generates the config files required for L2 (outputs to volume l2_config)
|
# Generates the config files required for L2 (outputs to volume l2_config)
|
||||||
op-node-l2-config-gen:
|
op-node-l2-config-gen:
|
||||||
|
restart: on-failure
|
||||||
image: cerc/optimism-op-node:local
|
image: cerc/optimism-op-node:local
|
||||||
depends_on:
|
depends_on:
|
||||||
fixturenet-optimism-contracts:
|
fixturenet-optimism-contracts:
|
||||||
|
|
@ -54,6 +56,7 @@ services:
|
||||||
|
|
||||||
# Initializes and runs the L2 execution client (outputs to volume l2_geth_data)
|
# Initializes and runs the L2 execution client (outputs to volume l2_geth_data)
|
||||||
op-geth:
|
op-geth:
|
||||||
|
restart: always
|
||||||
image: cerc/optimism-l2geth:local
|
image: cerc/optimism-l2geth:local
|
||||||
depends_on:
|
depends_on:
|
||||||
op-node-l2-config-gen:
|
op-node-l2-config-gen:
|
||||||
|
|
@ -76,6 +79,7 @@ services:
|
||||||
|
|
||||||
# Runs the L2 consensus client (Sequencer node)
|
# Runs the L2 consensus client (Sequencer node)
|
||||||
op-node:
|
op-node:
|
||||||
|
restart: always
|
||||||
image: cerc/optimism-op-node:local
|
image: cerc/optimism-op-node:local
|
||||||
depends_on:
|
depends_on:
|
||||||
op-geth:
|
op-geth:
|
||||||
|
|
@ -103,6 +107,7 @@ services:
|
||||||
|
|
||||||
# Runs the batcher (takes transactions from the Sequencer and publishes them to L1)
|
# Runs the batcher (takes transactions from the Sequencer and publishes them to L1)
|
||||||
op-batcher:
|
op-batcher:
|
||||||
|
restart: always
|
||||||
image: cerc/optimism-op-batcher:local
|
image: cerc/optimism-op-batcher:local
|
||||||
depends_on:
|
depends_on:
|
||||||
op-node:
|
op-node:
|
||||||
|
|
@ -129,6 +134,7 @@ services:
|
||||||
|
|
||||||
# Runs the proposer (periodically submits new state roots to L1)
|
# Runs the proposer (periodically submits new state roots to L1)
|
||||||
op-proposer:
|
op-proposer:
|
||||||
|
restart: always
|
||||||
image: cerc/optimism-op-proposer:local
|
image: cerc/optimism-op-proposer:local
|
||||||
depends_on:
|
depends_on:
|
||||||
op-node:
|
op-node:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,129 @@
|
||||||
|
services:
|
||||||
|
fixturenet-eth-bootnode-geth:
|
||||||
|
restart: always
|
||||||
|
hostname: fixturenet-eth-bootnode-geth
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
|
environment:
|
||||||
|
RUN_BOOTNODE: "true"
|
||||||
|
image: cerc/fixturenet-plugeth-plugeth:local
|
||||||
|
volumes:
|
||||||
|
- fixturenet_plugeth_bootnode_geth_data:/root/ethdata
|
||||||
|
- ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins
|
||||||
|
ports:
|
||||||
|
- "9898"
|
||||||
|
- "30303"
|
||||||
|
|
||||||
|
fixturenet-eth-geth-1:
|
||||||
|
restart: always
|
||||||
|
hostname: fixturenet-eth-geth-1
|
||||||
|
cap_add:
|
||||||
|
- SYS_PTRACE
|
||||||
|
environment:
|
||||||
|
CERC_REMOTE_DEBUG: "true"
|
||||||
|
CERC_RUN_STATEDIFF: "detect"
|
||||||
|
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||||
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
|
image: cerc/fixturenet-plugeth-plugeth:local
|
||||||
|
volumes:
|
||||||
|
- fixturenet_plugeth_geth_1_data:/root/ethdata
|
||||||
|
- ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8545/"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 3s
|
||||||
|
depends_on:
|
||||||
|
- fixturenet-eth-bootnode-geth
|
||||||
|
ports:
|
||||||
|
- "8545"
|
||||||
|
- "40000"
|
||||||
|
- "6060"
|
||||||
|
|
||||||
|
fixturenet-eth-geth-2:
|
||||||
|
restart: always
|
||||||
|
hostname: fixturenet-eth-geth-2
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8545/"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 3s
|
||||||
|
environment:
|
||||||
|
CERC_KEEP_RUNNING_AFTER_GETH_EXIT: "true"
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
|
image: cerc/fixturenet-plugeth-plugeth:local
|
||||||
|
depends_on:
|
||||||
|
- fixturenet-eth-bootnode-geth
|
||||||
|
volumes:
|
||||||
|
- fixturenet_plugeth_geth_2_data:/root/ethdata
|
||||||
|
- ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins
|
||||||
|
|
||||||
|
fixturenet-eth-bootnode-lighthouse:
|
||||||
|
restart: always
|
||||||
|
hostname: fixturenet-eth-bootnode-lighthouse
|
||||||
|
environment:
|
||||||
|
RUN_BOOTNODE: "true"
|
||||||
|
image: cerc/fixturenet-plugeth-lighthouse:local
|
||||||
|
|
||||||
|
fixturenet-eth-lighthouse-1:
|
||||||
|
restart: always
|
||||||
|
hostname: fixturenet-eth-lighthouse-1
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 30s
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
|
environment:
|
||||||
|
NODE_NUMBER: "1"
|
||||||
|
ETH1_ENDPOINT: "http://fixturenet-eth-geth-1:8545"
|
||||||
|
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-1:8551"
|
||||||
|
image: cerc/fixturenet-plugeth-lighthouse:local
|
||||||
|
volumes:
|
||||||
|
- fixturenet_plugeth_lighthouse_1_data:/opt/testnet/build/cl
|
||||||
|
depends_on:
|
||||||
|
fixturenet-eth-bootnode-lighthouse:
|
||||||
|
condition: service_started
|
||||||
|
fixturenet-eth-geth-1:
|
||||||
|
condition: service_healthy
|
||||||
|
ports:
|
||||||
|
- "8001"
|
||||||
|
|
||||||
|
fixturenet-eth-lighthouse-2:
|
||||||
|
restart: always
|
||||||
|
hostname: fixturenet-eth-lighthouse-2
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
|
start_period: 30s
|
||||||
|
env_file:
|
||||||
|
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||||
|
environment:
|
||||||
|
NODE_NUMBER: "2"
|
||||||
|
ETH1_ENDPOINT: "http://fixturenet-eth-geth-2:8545"
|
||||||
|
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-2:8551"
|
||||||
|
LIGHTHOUSE_GENESIS_STATE_URL: "http://fixturenet-eth-lighthouse-1:8001/eth/v2/debug/beacon/states/0"
|
||||||
|
image: cerc/fixturenet-plugeth-lighthouse:local
|
||||||
|
volumes:
|
||||||
|
- fixturenet_plugeth_lighthouse_2_data:/opt/testnet/build/cl
|
||||||
|
depends_on:
|
||||||
|
fixturenet-eth-bootnode-lighthouse:
|
||||||
|
condition: service_started
|
||||||
|
fixturenet-eth-geth-2:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
fixturenet_plugeth_bootnode_geth_data:
|
||||||
|
fixturenet_plugeth_geth_1_data:
|
||||||
|
fixturenet_plugeth_geth_2_data:
|
||||||
|
fixturenet_plugeth_lighthouse_1_data:
|
||||||
|
fixturenet_plugeth_lighthouse_2_data:
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
# Add-on pod to include foundry tooling within a fixturenet
|
# Add-on pod to include foundry tooling within a fixturenet
|
||||||
services:
|
services:
|
||||||
foundry:
|
foundry:
|
||||||
|
restart: always
|
||||||
image: cerc/foundry:local
|
image: cerc/foundry:local
|
||||||
command: ["while :; do sleep 600; done"]
|
command: ["while :; do sleep 600; done"]
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,9 @@ services:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
image: cerc/ipld-eth-server:local
|
image: cerc/ipld-eth-server:local
|
||||||
environment:
|
environment:
|
||||||
IPLD_SERVER_GRAPHQL: "true"
|
SERVER_HTTP_PATH: 0.0.0.0:8081
|
||||||
IPLD_POSTGRAPHILEPATH: http://graphql:5000
|
SERVER_GRAPHQL: "true"
|
||||||
ETH_SERVER_HTTPPATH: 0.0.0.0:8081
|
SERVER_GRAPHQLPATH: 0.0.0.0:8082
|
||||||
ETH_SERVER_GRAPHQL: "true"
|
|
||||||
ETH_SERVER_GRAPHQLPATH: 0.0.0.0:8082
|
|
||||||
VDB_COMMAND: "serve"
|
VDB_COMMAND: "serve"
|
||||||
ETH_CHAIN_CONFIG: "/tmp/chain.json"
|
ETH_CHAIN_CONFIG: "/tmp/chain.json"
|
||||||
DATABASE_NAME: cerc_testing
|
DATABASE_NAME: cerc_testing
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ services:
|
||||||
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
||||||
CERC_APP_WATCHER_URL: ${CERC_APP_WATCHER_URL}
|
CERC_APP_WATCHER_URL: ${CERC_APP_WATCHER_URL}
|
||||||
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
||||||
|
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||||
CERC_BUILD_DIR: "@cerc-io/mobymask-ui/build"
|
CERC_BUILD_DIR: "@cerc-io/mobymask-ui/build"
|
||||||
working_dir: /scripts
|
working_dir: /scripts
|
||||||
command: ["sh", "mobymask-app-start.sh"]
|
command: ["sh", "mobymask-app-start.sh"]
|
||||||
|
|
@ -44,6 +45,7 @@ services:
|
||||||
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
||||||
CERC_APP_WATCHER_URL: ${CERC_APP_WATCHER_URL}
|
CERC_APP_WATCHER_URL: ${CERC_APP_WATCHER_URL}
|
||||||
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
||||||
|
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||||
CERC_BUILD_DIR: "@cerc-io/mobymask-ui-lxdao/build"
|
CERC_BUILD_DIR: "@cerc-io/mobymask-ui-lxdao/build"
|
||||||
working_dir: /scripts
|
working_dir: /scripts
|
||||||
command: ["sh", "mobymask-app-start.sh"]
|
command: ["sh", "mobymask-app-start.sh"]
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
version: '3.2'
|
version: '3.2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
# Builds and serves the peer-test react-app
|
||||||
peer-test-app:
|
peer-test-app:
|
||||||
# Builds and serves the peer-test react-app
|
restart: unless-stopped
|
||||||
image: cerc/react-peer:local
|
image: cerc/react-peer:local
|
||||||
working_dir: /scripts
|
working_dir: /scripts
|
||||||
env_file:
|
env_file:
|
||||||
|
|
@ -10,6 +11,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
||||||
|
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||||
command: ["sh", "test-app-start.sh"]
|
command: ["sh", "test-app-start.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,13 @@
|
||||||
version: "3.2"
|
|
||||||
services:
|
services:
|
||||||
test:
|
test:
|
||||||
image: cerc/test-container:local
|
image: cerc/test-container:local
|
||||||
restart: always
|
restart: always
|
||||||
|
environment:
|
||||||
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
|
volumes:
|
||||||
|
- test-data:/var
|
||||||
ports:
|
ports:
|
||||||
- "80"
|
- "80"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
test-data:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,91 @@
|
||||||
|
version: '3.2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
# Starts the PostgreSQL database for watcher
|
||||||
|
gelato-watcher-db:
|
||||||
|
restart: unless-stopped
|
||||||
|
image: postgres:14-alpine
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=vdbm
|
||||||
|
- POSTGRES_MULTIPLE_DATABASES=gelato-watcher,gelato-watcher-job-queue
|
||||||
|
- POSTGRES_EXTENSION=gelato-watcher-job-queue:pgcrypto
|
||||||
|
- POSTGRES_PASSWORD=password
|
||||||
|
volumes:
|
||||||
|
- ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh
|
||||||
|
- gelato_watcher_db_data:/var/lib/postgresql/data
|
||||||
|
ports:
|
||||||
|
- "0.0.0.0:15432:5432"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 15
|
||||||
|
start_period: 10s
|
||||||
|
|
||||||
|
# Starts the gelato-watcher job runner
|
||||||
|
gelato-watcher-job-runner:
|
||||||
|
image: cerc/watcher-gelato:local
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
gelato-watcher-db:
|
||||||
|
condition: service_healthy
|
||||||
|
env_file:
|
||||||
|
- ../config/watcher-gelato/watcher-params.env
|
||||||
|
environment:
|
||||||
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
|
CERC_IPLD_ETH_RPC: ${CERC_IPLD_ETH_RPC}
|
||||||
|
CERC_IPLD_ETH_GQL: ${CERC_IPLD_ETH_GQL}
|
||||||
|
command: ["./start-job-runner.sh"]
|
||||||
|
volumes:
|
||||||
|
- ../config/watcher-gelato/watcher-config-template.toml:/app/environments/watcher-config-template.toml
|
||||||
|
- ../config/watcher-gelato/start-job-runner.sh:/app/start-job-runner.sh
|
||||||
|
ports:
|
||||||
|
- "0.0.0.0:9000:9000"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "nc", "-v", "localhost", "9000"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 15
|
||||||
|
start_period: 10s
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
|
|
||||||
|
# Starts the gelato-watcher server
|
||||||
|
gelato-watcher-server:
|
||||||
|
image: cerc/watcher-gelato:local
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
gelato-watcher-db:
|
||||||
|
condition: service_healthy
|
||||||
|
gelato-watcher-job-runner:
|
||||||
|
condition: service_healthy
|
||||||
|
env_file:
|
||||||
|
- ../config/watcher-gelato/watcher-params.env
|
||||||
|
environment:
|
||||||
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
|
CERC_IPLD_ETH_RPC: ${CERC_IPLD_ETH_RPC}
|
||||||
|
CERC_IPLD_ETH_GQL: ${CERC_IPLD_ETH_GQL}
|
||||||
|
CERC_USE_STATE_SNAPSHOT: ${CERC_USE_STATE_SNAPSHOT}
|
||||||
|
CERC_SNAPSHOT_GQL_ENDPOINT: ${CERC_SNAPSHOT_GQL_ENDPOINT}
|
||||||
|
CERC_SNAPSHOT_BLOCKHASH: ${CERC_SNAPSHOT_BLOCKHASH}
|
||||||
|
command: ["./start-server.sh"]
|
||||||
|
volumes:
|
||||||
|
- ../config/watcher-gelato/watcher-config-template.toml:/app/environments/watcher-config-template.toml
|
||||||
|
- ../config/watcher-gelato/start-server.sh:/app/start-server.sh
|
||||||
|
- ../config/watcher-gelato/create-and-import-checkpoint.sh:/app/create-and-import-checkpoint.sh
|
||||||
|
- gelato_watcher_state_gql:/app/state_checkpoint
|
||||||
|
ports:
|
||||||
|
- "0.0.0.0:3008:3008"
|
||||||
|
- "0.0.0.0:9001:9001"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "nc", "-v", "localhost", "3008"]
|
||||||
|
interval: 20s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 15
|
||||||
|
start_period: 5s
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
gelato_watcher_db_data:
|
||||||
|
gelato_watcher_state_gql:
|
||||||
|
|
@ -83,6 +83,7 @@ services:
|
||||||
CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL}
|
CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL}
|
||||||
CERC_PRIVATE_KEY_PEER: ${CERC_PRIVATE_KEY_PEER}
|
CERC_PRIVATE_KEY_PEER: ${CERC_PRIVATE_KEY_PEER}
|
||||||
CERC_RELAY_PEERS: ${CERC_RELAY_PEERS}
|
CERC_RELAY_PEERS: ${CERC_RELAY_PEERS}
|
||||||
|
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||||
CERC_RELAY_ANNOUNCE_DOMAIN: ${CERC_RELAY_ANNOUNCE_DOMAIN}
|
CERC_RELAY_ANNOUNCE_DOMAIN: ${CERC_RELAY_ANNOUNCE_DOMAIN}
|
||||||
CERC_ENABLE_PEER_L2_TXS: ${CERC_ENABLE_PEER_L2_TXS}
|
CERC_ENABLE_PEER_L2_TXS: ${CERC_ENABLE_PEER_L2_TXS}
|
||||||
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@ CERC_STATEDIFF_DB_PORT=5432
|
||||||
CERC_STATEDIFF_DB_NAME="cerc_testing"
|
CERC_STATEDIFF_DB_NAME="cerc_testing"
|
||||||
CERC_STATEDIFF_DB_USER="vdbm"
|
CERC_STATEDIFF_DB_USER="vdbm"
|
||||||
CERC_STATEDIFF_DB_PASSWORD="password"
|
CERC_STATEDIFF_DB_PASSWORD="password"
|
||||||
CERC_STATEDIFF_DB_GOOSE_MIN_VER=23
|
CERC_STATEDIFF_DB_GOOSE_MIN_VER=${CERC_STATEDIFF_DB_GOOSE_MIN_VER:-18}
|
||||||
CERC_STATEDIFF_DB_LOG_STATEMENTS="false"
|
CERC_STATEDIFF_DB_LOG_STATEMENTS="false"
|
||||||
|
CERC_STATEDIFF_WORKERS=2
|
||||||
|
|
||||||
CERC_GETH_VMODULE="statediff/*=5,rpc/*=5"
|
CERC_GETH_VMODULE="statediff/*=5,rpc/*=5"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
}+V<>{iνΆΠΉ<CEA0>²<EFBFBD>¨ΣΗ\k»qς
—?δΪAΒfκ’~μ©™LΉ<4C>tb·yqτ·²ηξΔ<CEBE>Ο?ξaΣ<61>J
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Βfκ’~μ©™LΉ<4C>tb·yqτ·²ηξΔ<CEBE>Ο?ξaΣ<61>J
|
||||||
BIN
app/data/config/fixturenet-lotus/genesis/.genesis-sectors/cache/s-t01000-0/t_aux
vendored
100644
BIN
app/data/config/fixturenet-lotus/genesis/.genesis-sectors/cache/s-t01000-0/t_aux
vendored
100644
Binary file not shown.
BIN
app/data/config/fixturenet-lotus/genesis/.genesis-sectors/cache/s-t01000-1/p_aux
vendored
100644
BIN
app/data/config/fixturenet-lotus/genesis/.genesis-sectors/cache/s-t01000-1/p_aux
vendored
100644
Binary file not shown.
Binary file not shown.
BIN
app/data/config/fixturenet-lotus/genesis/.genesis-sectors/cache/s-t01000-1/t_aux
vendored
100644
BIN
app/data/config/fixturenet-lotus/genesis/.genesis-sectors/cache/s-t01000-1/t_aux
vendored
100644
Binary file not shown.
|
|
@ -0,0 +1,71 @@
|
||||||
|
{
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
7b2254797065223a22626c73222c22507269766174654b6579223a227446765352695367324733537367673050535979323358796a61494d5870736d64794732423755464c54343d227d
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"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.
|
|
@ -0,0 +1,108 @@
|
||||||
|
{
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
LOTUS_PATH=~/.lotus-local-net
|
||||||
|
LOTUS_MINER_PATH=~/.lotus-miner-local-net
|
||||||
|
LOTUS_SKIP_GENESIS_CHECK=_yes_
|
||||||
|
CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__"
|
||||||
|
CGO_CFLAGS="-D__BLST_PORTABLE__"
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
lotus --version
|
||||||
|
|
||||||
|
# # remove old bootnode peer info if present
|
||||||
|
# [ -f /root/.lotus-shared/miner.addr ] && rm /root/.lotus-shared/miner.addr
|
||||||
|
|
||||||
|
##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
|
||||||
|
|
||||||
|
|
||||||
|
# start daemon
|
||||||
|
nohup lotus daemon --genesis=/devgen.car --profile=bootstrapper --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
|
||||||
|
done
|
||||||
|
echo "Daemon started."
|
||||||
|
|
||||||
|
# publish bootnode peer info to shared volume
|
||||||
|
lotus net listen | awk 'NR==1{print}' > /root/.lotus-shared/miner.addr
|
||||||
|
|
||||||
|
# if miner not already initialized
|
||||||
|
if [ ! -d /root/.lotus-miner-local-net ]; then
|
||||||
|
# initialize miner
|
||||||
|
lotus wallet import --as-default ~/.genesis-sectors/pre-seal-t01000.key
|
||||||
|
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
|
||||||
|
|
||||||
|
# start miner
|
||||||
|
nohup lotus-miner run --nosync &
|
||||||
|
|
||||||
|
tail -f /dev/null
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
lotus --version
|
||||||
|
|
||||||
|
##TODO: paths can use values from lotus-env.env file
|
||||||
|
|
||||||
|
# if not already initialized
|
||||||
|
if [ ! -f /root/.lotus-local-net/config.toml ]; then
|
||||||
|
# init node config
|
||||||
|
mkdir $HOME/.lotus-local-net
|
||||||
|
lotus config default > $HOME/.lotus-local-net/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
|
||||||
|
else
|
||||||
|
echo "Bootstrap peer info not found, unable to configure. Manual peering will be required."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# start node
|
||||||
|
lotus daemon --genesis=/devgen.car
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
See: https://docs.plugeth.org/
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
CERC_SNAPSHOT_GQL_ENDPOINT="${CERC_SNAPSHOT_GQL_ENDPOINT:-${DEFAULT_CERC_SNAPSHOT_GQL_ENDPOINT}}"
|
||||||
|
CERC_SNAPSHOT_BLOCKHASH="${CERC_SNAPSHOT_BLOCKHASH:-${DEFAULT_CERC_SNAPSHOT_BLOCKHASH}}"
|
||||||
|
|
||||||
|
CHECKPOINT_FILE_PATH="./state_checkpoint/state-gql-${CERC_SNAPSHOT_BLOCKHASH}"
|
||||||
|
|
||||||
|
if [ -f "${CHECKPOINT_FILE_PATH}" ]; then
|
||||||
|
# Skip checkpoint creation if the file already exists
|
||||||
|
echo "File at ${CHECKPOINT_FILE_PATH} already exists, skipping checkpoint creation..."
|
||||||
|
else
|
||||||
|
# Create a checkpoint using GQL endpoint
|
||||||
|
echo "Creating a state checkpoint using GQL endpoint..."
|
||||||
|
yarn create-state-gql \
|
||||||
|
--snapshot-block-hash "${CERC_SNAPSHOT_BLOCKHASH}" \
|
||||||
|
--gql-endpoint "${CERC_SNAPSHOT_GQL_ENDPOINT}" \
|
||||||
|
--output "${CHECKPOINT_FILE_PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Initializing watcher using a state snapshot..."
|
||||||
|
|
||||||
|
# Import the state checkpoint
|
||||||
|
# (skips if snapshot block is already indexed)
|
||||||
|
yarn import-state --import-file "${CHECKPOINT_FILE_PATH}"
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
CERC_IPLD_ETH_RPC="${CERC_IPLD_ETH_RPC:-${DEFAULT_CERC_IPLD_ETH_RPC}}"
|
||||||
|
CERC_IPLD_ETH_GQL="${CERC_IPLD_ETH_GQL:-${DEFAULT_CERC_IPLD_ETH_GQL}}"
|
||||||
|
|
||||||
|
echo "Using ETH server RPC endpoint ${CERC_IPLD_ETH_RPC}"
|
||||||
|
echo "Using ETH server GQL endpoint ${CERC_IPLD_ETH_GQL}"
|
||||||
|
|
||||||
|
# Read in the config template TOML file and modify it
|
||||||
|
WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml)
|
||||||
|
WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \
|
||||||
|
sed -E "s|REPLACE_WITH_CERC_IPLD_ETH_GQL|${CERC_IPLD_ETH_GQL}|g; \
|
||||||
|
s|REPLACE_WITH_CERC_IPLD_ETH_RPC|${CERC_IPLD_ETH_RPC}| ")
|
||||||
|
|
||||||
|
# Write the modified content to a new file
|
||||||
|
echo "$WATCHER_CONFIG" > environments/local.toml
|
||||||
|
|
||||||
|
echo "Running job-runner"
|
||||||
|
DEBUG=vulcanize:* exec node --enable-source-maps dist/job-runner.js
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
CERC_IPLD_ETH_RPC="${CERC_IPLD_ETH_RPC:-${DEFAULT_CERC_IPLD_ETH_RPC}}"
|
||||||
|
CERC_IPLD_ETH_GQL="${CERC_IPLD_ETH_GQL:-${DEFAULT_CERC_IPLD_ETH_GQL}}"
|
||||||
|
|
||||||
|
CERC_USE_STATE_SNAPSHOT="${CERC_USE_STATE_SNAPSHOT:-${DEFAULT_CERC_USE_STATE_SNAPSHOT}}"
|
||||||
|
|
||||||
|
echo "Using ETH server RPC endpoint ${CERC_IPLD_ETH_RPC}"
|
||||||
|
echo "Using ETH server GQL endpoint ${CERC_IPLD_ETH_GQL}"
|
||||||
|
|
||||||
|
# Read in the config template TOML file and modify it
|
||||||
|
WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml)
|
||||||
|
WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \
|
||||||
|
sed -E "s|REPLACE_WITH_CERC_IPLD_ETH_GQL|${CERC_IPLD_ETH_GQL}|g; \
|
||||||
|
s|REPLACE_WITH_CERC_IPLD_ETH_RPC|${CERC_IPLD_ETH_RPC}| ")
|
||||||
|
|
||||||
|
# Write the modified content to a new file
|
||||||
|
echo "$WATCHER_CONFIG" > environments/local.toml
|
||||||
|
|
||||||
|
if [ "$CERC_USE_STATE_SNAPSHOT" = true ] ; then
|
||||||
|
./create-and-import-checkpoint.sh
|
||||||
|
else
|
||||||
|
echo "Initializing watcher using fill..."
|
||||||
|
yarn fill --start-block $DEFAULT_CERC_GELATO_START_BLOCK --end-block $DEFAULT_CERC_GELATO_START_BLOCK
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Running active server"
|
||||||
|
DEBUG=vulcanize:* exec node --enable-source-maps dist/server.js
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
[server]
|
||||||
|
host = "0.0.0.0"
|
||||||
|
port = 3008
|
||||||
|
kind = "active"
|
||||||
|
|
||||||
|
# Checkpointing state.
|
||||||
|
checkpointing = true
|
||||||
|
|
||||||
|
# Checkpoint interval in number of blocks.
|
||||||
|
checkpointInterval = 2000
|
||||||
|
|
||||||
|
# Enable state creation
|
||||||
|
# CAUTION: Disable only if state creation is not desired or can be filled subsequently
|
||||||
|
enableState = true
|
||||||
|
|
||||||
|
subgraphPath = "./subgraph"
|
||||||
|
|
||||||
|
# Interval to restart wasm instance periodically
|
||||||
|
wasmRestartBlocksInterval = 20
|
||||||
|
|
||||||
|
# Interval in number of blocks at which to clear entities cache.
|
||||||
|
clearEntitiesCacheInterval = 1000
|
||||||
|
|
||||||
|
# Boolean to filter logs by contract.
|
||||||
|
filterLogs = true
|
||||||
|
|
||||||
|
# Max block range for which to return events in eventsInRange GQL query.
|
||||||
|
# Use -1 for skipping check on block range.
|
||||||
|
maxEventsBlockRange = 1000
|
||||||
|
|
||||||
|
# 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 = 9000
|
||||||
|
[metrics.gql]
|
||||||
|
port = 9001
|
||||||
|
|
||||||
|
[database]
|
||||||
|
type = "postgres"
|
||||||
|
host = "gelato-watcher-db"
|
||||||
|
port = 5432
|
||||||
|
database = "gelato-watcher"
|
||||||
|
username = "vdbm"
|
||||||
|
password = "password"
|
||||||
|
synchronize = true
|
||||||
|
logging = false
|
||||||
|
|
||||||
|
[upstream]
|
||||||
|
[upstream.ethServer]
|
||||||
|
gqlApiEndpoint = "REPLACE_WITH_CERC_IPLD_ETH_GQL"
|
||||||
|
rpcProviderEndpoint = "REPLACE_WITH_CERC_IPLD_ETH_RPC"
|
||||||
|
|
||||||
|
[upstream.cache]
|
||||||
|
name = "requests"
|
||||||
|
enabled = false
|
||||||
|
deleteOnStart = false
|
||||||
|
|
||||||
|
[jobQueue]
|
||||||
|
dbConnectionString = "postgres://vdbm:password@gelato-watcher-db/gelato-watcher-job-queue"
|
||||||
|
maxCompletionLagInSecs = 300
|
||||||
|
jobDelayInMilliSecs = 100
|
||||||
|
eventsInBatch = 50
|
||||||
|
blockDelayInMilliSecs = 2000
|
||||||
|
prefetchBlocksInMem = true
|
||||||
|
prefetchBlockCount = 10
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
# ipld-eth-server endpoints
|
||||||
|
DEFAULT_CERC_IPLD_ETH_RPC="http://ipld-eth-server:8082"
|
||||||
|
DEFAULT_CERC_IPLD_ETH_GQL="http://ipld-eth-server:8083/graphql"
|
||||||
|
|
||||||
|
# Gelato start block
|
||||||
|
DEFAULT_CERC_GELATO_START_BLOCK=11361987
|
||||||
|
|
||||||
|
# Whether to use a state snapshot to initialize the watcher
|
||||||
|
DEFAULT_CERC_USE_STATE_SNAPSHOT=false
|
||||||
|
|
||||||
|
# State snapshot params
|
||||||
|
DEFAULT_CERC_SNAPSHOT_GQL_ENDPOINT=
|
||||||
|
DEFAULT_CERC_SNAPSHOT_BLOCKHASH=
|
||||||
|
|
@ -7,6 +7,7 @@ fi
|
||||||
CERC_CHAIN_ID="${CERC_CHAIN_ID:-${DEFAULT_CERC_CHAIN_ID}}"
|
CERC_CHAIN_ID="${CERC_CHAIN_ID:-${DEFAULT_CERC_CHAIN_ID}}"
|
||||||
CERC_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRACT}}"
|
CERC_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRACT}}"
|
||||||
CERC_RELAY_NODES="${CERC_RELAY_NODES:-${DEFAULT_CERC_RELAY_NODES}}"
|
CERC_RELAY_NODES="${CERC_RELAY_NODES:-${DEFAULT_CERC_RELAY_NODES}}"
|
||||||
|
CERC_DENY_MULTIADDRS="${CERC_DENY_MULTIADDRS:-${DEFAULT_CERC_DENY_MULTIADDRS}}"
|
||||||
CERC_APP_WATCHER_URL="${CERC_APP_WATCHER_URL:-${DEFAULT_CERC_APP_WATCHER_URL}}"
|
CERC_APP_WATCHER_URL="${CERC_APP_WATCHER_URL:-${DEFAULT_CERC_APP_WATCHER_URL}}"
|
||||||
|
|
||||||
# If not set (or []), check the mounted volume for relay peer id
|
# If not set (or []), check the mounted volume for relay peer id
|
||||||
|
|
@ -37,5 +38,6 @@ yq -n ".address = env(CERC_DEPLOYED_CONTRACT)" > /config/config.yml
|
||||||
yq ".watcherUrl = env(CERC_APP_WATCHER_URL)" -i /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 ".chainId = env(CERC_CHAIN_ID)" -i /config/config.yml
|
||||||
yq ".relayNodes = strenv(CERC_RELAY_NODES)" -i /config/config.yml
|
yq ".relayNodes = strenv(CERC_RELAY_NODES)" -i /config/config.yml
|
||||||
|
yq ".denyMultiaddrs = strenv(CERC_DENY_MULTIADDRS)" -i /config/config.yml
|
||||||
|
|
||||||
/scripts/start-serving-app.sh
|
/scripts/start-serving-app.sh
|
||||||
|
|
|
||||||
|
|
@ -24,3 +24,6 @@ DEFAULT_CERC_CHAIN_ID=42069
|
||||||
|
|
||||||
# Set of relay nodes to be used by web-apps
|
# Set of relay nodes to be used by web-apps
|
||||||
DEFAULT_CERC_RELAY_NODES=[]
|
DEFAULT_CERC_RELAY_NODES=[]
|
||||||
|
|
||||||
|
# Set of multiaddrs to be avoided while dialling
|
||||||
|
DEFAULT_CERC_DENY_MULTIADDRS=[]
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,20 @@ CERC_L2_GETH_RPC="${CERC_L2_GETH_RPC:-${DEFAULT_CERC_L2_GETH_RPC}}"
|
||||||
CERC_L1_ACCOUNTS_CSV_URL="${CERC_L1_ACCOUNTS_CSV_URL:-${DEFAULT_CERC_L1_ACCOUNTS_CSV_URL}}"
|
CERC_L1_ACCOUNTS_CSV_URL="${CERC_L1_ACCOUNTS_CSV_URL:-${DEFAULT_CERC_L1_ACCOUNTS_CSV_URL}}"
|
||||||
|
|
||||||
CERC_RELAY_PEERS="${CERC_RELAY_PEERS:-${DEFAULT_CERC_RELAY_PEERS}}"
|
CERC_RELAY_PEERS="${CERC_RELAY_PEERS:-${DEFAULT_CERC_RELAY_PEERS}}"
|
||||||
|
CERC_DENY_MULTIADDRS="${CERC_DENY_MULTIADDRS:-${DEFAULT_CERC_DENY_MULTIADDRS}}"
|
||||||
CERC_RELAY_ANNOUNCE_DOMAIN="${CERC_RELAY_ANNOUNCE_DOMAIN:-${DEFAULT_CERC_RELAY_ANNOUNCE_DOMAIN}}"
|
CERC_RELAY_ANNOUNCE_DOMAIN="${CERC_RELAY_ANNOUNCE_DOMAIN:-${DEFAULT_CERC_RELAY_ANNOUNCE_DOMAIN}}"
|
||||||
CERC_ENABLE_PEER_L2_TXS="${CERC_ENABLE_PEER_L2_TXS:-${DEFAULT_CERC_ENABLE_PEER_L2_TXS}}"
|
CERC_ENABLE_PEER_L2_TXS="${CERC_ENABLE_PEER_L2_TXS:-${DEFAULT_CERC_ENABLE_PEER_L2_TXS}}"
|
||||||
CERC_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRACT}}"
|
CERC_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRACT}}"
|
||||||
|
|
||||||
echo "Using L2 RPC endpoint ${CERC_L2_GETH_RPC}"
|
echo "Using L2 RPC endpoint ${CERC_L2_GETH_RPC}"
|
||||||
|
|
||||||
CERC_RELAY_MULTIADDR="/dns4/mobymask-watcher-server/tcp/9090/ws/p2p/$(jq -r '.id' /app/peers/relay-id.json)"
|
# Use public domain for relay multiaddr in peer config if specified
|
||||||
|
# Otherwise, use the docker container's host IP
|
||||||
|
if [ -n "$CERC_RELAY_ANNOUNCE_DOMAIN" ]; then
|
||||||
|
CERC_RELAY_MULTIADDR="/dns4/${CERC_RELAY_ANNOUNCE_DOMAIN}/tcp/443/wss/p2p/$(jq -r '.id' /app/peers/relay-id.json)"
|
||||||
|
else
|
||||||
|
CERC_RELAY_MULTIADDR="/dns4/mobymask-watcher-server/tcp/9090/ws/p2p/$(jq -r '.id' /app/peers/relay-id.json)"
|
||||||
|
fi
|
||||||
|
|
||||||
# Use contract address from environment variable or set from config.json in mounted volume
|
# Use contract address from environment variable or set from config.json in mounted volume
|
||||||
if [ -n "$CERC_DEPLOYED_CONTRACT" ]; then
|
if [ -n "$CERC_DEPLOYED_CONTRACT" ]; then
|
||||||
|
|
@ -42,6 +49,7 @@ fi
|
||||||
WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml)
|
WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml)
|
||||||
WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \
|
WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \
|
||||||
sed -E "s|REPLACE_WITH_CERC_RELAY_PEERS|${CERC_RELAY_PEERS}|g; \
|
sed -E "s|REPLACE_WITH_CERC_RELAY_PEERS|${CERC_RELAY_PEERS}|g; \
|
||||||
|
s|REPLACE_WITH_CERC_DENY_MULTIADDRS|${CERC_DENY_MULTIADDRS}|g; \
|
||||||
s/REPLACE_WITH_CERC_RELAY_ANNOUNCE_DOMAIN/${CERC_RELAY_ANNOUNCE_DOMAIN}/g; \
|
s/REPLACE_WITH_CERC_RELAY_ANNOUNCE_DOMAIN/${CERC_RELAY_ANNOUNCE_DOMAIN}/g; \
|
||||||
s|REPLACE_WITH_CERC_RELAY_MULTIADDR|${CERC_RELAY_MULTIADDR}|g; \
|
s|REPLACE_WITH_CERC_RELAY_MULTIADDR|${CERC_RELAY_MULTIADDR}|g; \
|
||||||
s/REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS/${CERC_ENABLE_PEER_L2_TXS}/g; \
|
s/REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS/${CERC_ENABLE_PEER_L2_TXS}/g; \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"relayNodes": [],
|
"relayNodes": [],
|
||||||
"peer": {
|
"peer": {
|
||||||
|
"denyMultiaddrs": [],
|
||||||
"enableDebugInfo": true
|
"enableDebugInfo": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CERC_RELAY_NODES="${CERC_RELAY_NODES:-${DEFAULT_CERC_RELAY_NODES}}"
|
CERC_RELAY_NODES="${CERC_RELAY_NODES:-${DEFAULT_CERC_RELAY_NODES}}"
|
||||||
|
CERC_DENY_MULTIADDRS="${CERC_DENY_MULTIADDRS:-${DEFAULT_CERC_DENY_MULTIADDRS}}"
|
||||||
|
|
||||||
# If not set (or []), check the mounted volume for relay peer id
|
# If not set (or []), check the mounted volume for relay peer id
|
||||||
if [ -z "$CERC_RELAY_NODES" ] || [ "$CERC_RELAY_NODES" = "[]" ]; then
|
if [ -z "$CERC_RELAY_NODES" ] || [ "$CERC_RELAY_NODES" = "[]" ]; then
|
||||||
|
|
@ -16,5 +17,6 @@ echo "Using CERC_RELAY_NODES $CERC_RELAY_NODES"
|
||||||
|
|
||||||
# Use yq to create config.yml with environment variables
|
# Use yq to create config.yml with environment variables
|
||||||
yq -n ".relayNodes = strenv(CERC_RELAY_NODES)" > /config/config.yml
|
yq -n ".relayNodes = strenv(CERC_RELAY_NODES)" > /config/config.yml
|
||||||
|
yq ".denyMultiaddrs = strenv(CERC_DENY_MULTIADDRS)" -i /config/config.yml
|
||||||
|
|
||||||
/scripts/start-serving-app.sh
|
/scripts/start-serving-app.sh
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
host = "0.0.0.0"
|
host = "0.0.0.0"
|
||||||
port = 9090
|
port = 9090
|
||||||
relayPeers = REPLACE_WITH_CERC_RELAY_PEERS
|
relayPeers = REPLACE_WITH_CERC_RELAY_PEERS
|
||||||
|
denyMultiaddrs = REPLACE_WITH_CERC_DENY_MULTIADDRS
|
||||||
peerIdFile = './peers/relay-id.json'
|
peerIdFile = './peers/relay-id.json'
|
||||||
announce = 'REPLACE_WITH_CERC_RELAY_ANNOUNCE_DOMAIN'
|
announce = 'REPLACE_WITH_CERC_RELAY_ANNOUNCE_DOMAIN'
|
||||||
enableDebugInfo = true
|
enableDebugInfo = true
|
||||||
|
|
@ -34,6 +35,7 @@
|
||||||
[server.p2p.peer]
|
[server.p2p.peer]
|
||||||
relayMultiaddr = 'REPLACE_WITH_CERC_RELAY_MULTIADDR'
|
relayMultiaddr = 'REPLACE_WITH_CERC_RELAY_MULTIADDR'
|
||||||
pubSubTopic = 'mobymask'
|
pubSubTopic = 'mobymask'
|
||||||
|
denyMultiaddrs = REPLACE_WITH_CERC_DENY_MULTIADDRS
|
||||||
peerIdFile = './peers/peer-id.json'
|
peerIdFile = './peers/peer-id.json'
|
||||||
enableDebugInfo = true
|
enableDebugInfo = true
|
||||||
enableL2Txs = REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS
|
enableL2Txs = REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ yarn_info_output=$(yarn info --json $versioned_target_package 2>/dev/null)
|
||||||
# If it doesn't exist there will be no .data.dist.tarball element,
|
# If it doesn't exist there will be no .data.dist.tarball element,
|
||||||
# and jq will output the string "null"
|
# and jq will output the string "null"
|
||||||
package_tarball=$(echo $yarn_info_output | jq -r .data.dist.tarball)
|
package_tarball=$(echo $yarn_info_output | jq -r .data.dist.tarball)
|
||||||
if [[ $package_tarball == "null" ]]; then
|
if [[ "$yarn_info_output" == "" || $package_tarball == "null" ]]; then
|
||||||
echo "FATAL: Target package version ($versioned_target_package) not found" >&2
|
echo "FATAL: Target package version ($versioned_target_package) not found (or bad npm auth token)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Code below parses out the values we need
|
# Code below parses out the values we need
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||||
|
|
||||||
FROM cerc/go-ethereum:local as geth
|
FROM cerc/go-ethereum:local as geth
|
||||||
|
|
||||||
FROM alpine: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
|
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=delve /go/bin/dlv /usr/local/bin/
|
||||||
|
|
@ -22,6 +22,18 @@ COPY run-el.sh /opt/testnet/run.sh
|
||||||
RUN cd /opt/testnet && make genesis-el
|
RUN cd /opt/testnet && make genesis-el
|
||||||
|
|
||||||
COPY --from=geth /usr/local/bin/geth /usr/local/bin/
|
COPY --from=geth /usr/local/bin/geth /usr/local/bin/
|
||||||
|
|
||||||
|
# Snag the genesis block info.
|
||||||
RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey
|
RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey
|
||||||
|
RUN cp -rp ~/ethdata ~/tmpeth && \
|
||||||
|
geth --datadir ~/tmpeth init /opt/testnet/build/el/geth.json && \
|
||||||
|
geth --datadir ~/tmpeth --http & \
|
||||||
|
sleep 5 && \
|
||||||
|
curl -q --location 'localhost:8545' \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{ "jsonrpc": "2.0", "id": 14, "method": "eth_getBlockByNumber", "params": ["0x0", false] }' \
|
||||||
|
-o /opt/testnet/build/el/genesis_block.json && \
|
||||||
|
killall -9 geth && \
|
||||||
|
rm -rf ~/tmpeth
|
||||||
|
|
||||||
ENTRYPOINT ["/opt/testnet/run.sh"]
|
ENTRYPOINT ["/opt/testnet/run.sh"]
|
||||||
|
|
|
||||||
|
|
@ -34,5 +34,7 @@ python3 /apps/el-gen/genesis_geth.py $tmp_dir/genesis-config.yaml | \
|
||||||
jq ".config.istanbulBlock=$istanbul_block" | \
|
jq ".config.istanbulBlock=$istanbul_block" | \
|
||||||
jq ".config.berlinBlock=$berlin_block" | \
|
jq ".config.berlinBlock=$berlin_block" | \
|
||||||
jq ".config.londonBlock=$london_block" | \
|
jq ".config.londonBlock=$london_block" | \
|
||||||
jq ".config.mergeForkBlock=$merge_fork_block" > ../build/el/geth.json
|
jq ".config.mergeForkBlock=$merge_fork_block" | \
|
||||||
|
jq ".config.mergeNetsplitBlock=$merge_fork_block" \
|
||||||
|
> ../build/el/geth.json
|
||||||
python3 ../accounts/mnemonic_to_csv.py $tmp_dir/genesis-config.yaml > ../build/el/accounts.csv
|
python3 ../accounts/mnemonic_to_csv.py $tmp_dir/genesis-config.yaml > ../build/el/accounts.csv
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,8 @@ else
|
||||||
STATEDIFF_OPTS=""
|
STATEDIFF_OPTS=""
|
||||||
if [ "$CERC_RUN_STATEDIFF" == "true" ]; then
|
if [ "$CERC_RUN_STATEDIFF" == "true" ]; then
|
||||||
ready=0
|
ready=0
|
||||||
|
echo "Waiting for statediff DB..."
|
||||||
while [ $ready -eq 0 ]; do
|
while [ $ready -eq 0 ]; do
|
||||||
echo "Waiting for statediff DB..."
|
|
||||||
sleep 1
|
sleep 1
|
||||||
export PGPASSWORD="$CERC_STATEDIFF_DB_PASSWORD"
|
export PGPASSWORD="$CERC_STATEDIFF_DB_PASSWORD"
|
||||||
result=$(psql -h "$CERC_STATEDIFF_DB_HOST" \
|
result=$(psql -h "$CERC_STATEDIFF_DB_HOST" \
|
||||||
|
|
@ -73,9 +73,13 @@ else
|
||||||
-U "$CERC_STATEDIFF_DB_USER" \
|
-U "$CERC_STATEDIFF_DB_USER" \
|
||||||
-d "$CERC_STATEDIFF_DB_NAME" \
|
-d "$CERC_STATEDIFF_DB_NAME" \
|
||||||
-t -c 'select max(version_id) from goose_db_version;' 2>/dev/null | awk '{ print $1 }')
|
-t -c 'select max(version_id) from goose_db_version;' 2>/dev/null | awk '{ print $1 }')
|
||||||
if [ -n "$result" ] && [ $result -ge $CERC_STATEDIFF_DB_GOOSE_MIN_VER ]; then
|
if [ -n "$result" ]; then
|
||||||
echo "DB ready..."
|
echo "DB ready..."
|
||||||
ready=1
|
if [ $result -ge $CERC_STATEDIFF_DB_GOOSE_MIN_VER ]; then
|
||||||
|
ready=1
|
||||||
|
else
|
||||||
|
echo "DB not at required version (want $CERC_STATEDIFF_DB_GOOSE_MIN_VER, have $result)"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
STATEDIFF_OPTS="--statediff=true \
|
STATEDIFF_OPTS="--statediff=true \
|
||||||
|
|
@ -88,6 +92,7 @@ else
|
||||||
--statediff.db.logstatements=${CERC_STATEDIFF_DB_LOG_STATEMENTS:-false} \
|
--statediff.db.logstatements=${CERC_STATEDIFF_DB_LOG_STATEMENTS:-false} \
|
||||||
--statediff.db.copyfrom=${CERC_STATEDIFF_DB_COPY_FROM:-true} \
|
--statediff.db.copyfrom=${CERC_STATEDIFF_DB_COPY_FROM:-true} \
|
||||||
--statediff.waitforsync=true \
|
--statediff.waitforsync=true \
|
||||||
|
--statediff.workers=${CERC_STATEDIFF_WORKERS:-1} \
|
||||||
--statediff.writing=true"
|
--statediff.writing=true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
FROM sigp/lcli:v4.1.0 AS lcli
|
FROM cerc/lighthouse-cli:local AS lcli
|
||||||
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||||
FROM cerc/fixturenet-eth-geth:local AS fnetgeth
|
FROM cerc/fixturenet-eth-geth:local AS fnetgeth
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,22 +13,26 @@ DEBUG_LEVEL=${1:-info}
|
||||||
|
|
||||||
echo "Starting bootnode"
|
echo "Starting bootnode"
|
||||||
|
|
||||||
if [ ! -f "$DATADIR/bootnode/enr.dat" ]; then
|
# Clean up existing ENR dir to avoid node connectivity issues on a restart
|
||||||
echo "Generating bootnode enr"
|
if [ -d "$DATADIR/bootnode" ]; then
|
||||||
lcli \
|
echo "Removing existing bootnode enr directory"
|
||||||
generate-bootnode-enr \
|
rm -r "$DATADIR/bootnode"
|
||||||
--ip $ENR_IP \
|
|
||||||
--udp-port $BOOTNODE_PORT \
|
|
||||||
--tcp-port $BOOTNODE_PORT \
|
|
||||||
--genesis-fork-version $GENESIS_FORK_VERSION \
|
|
||||||
--output-dir $DATADIR/bootnode
|
|
||||||
|
|
||||||
bootnode_enr=`cat $DATADIR/bootnode/enr.dat`
|
|
||||||
echo "- $bootnode_enr" > $TESTNET_DIR/boot_enr.yaml
|
|
||||||
|
|
||||||
echo "Generated bootnode enr and written to $TESTNET_DIR/boot_enr.yaml"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Generating bootnode enr"
|
||||||
|
lcli \
|
||||||
|
generate-bootnode-enr \
|
||||||
|
--ip $ENR_IP \
|
||||||
|
--udp-port $BOOTNODE_PORT \
|
||||||
|
--tcp-port $BOOTNODE_PORT \
|
||||||
|
--genesis-fork-version $GENESIS_FORK_VERSION \
|
||||||
|
--output-dir $DATADIR/bootnode
|
||||||
|
|
||||||
|
bootnode_enr=`cat $DATADIR/bootnode/enr.dat`
|
||||||
|
echo "- $bootnode_enr" > $TESTNET_DIR/boot_enr.yaml
|
||||||
|
|
||||||
|
echo "Generated bootnode enr and written to $TESTNET_DIR/boot_enr.yaml"
|
||||||
|
|
||||||
exec lighthouse boot_node \
|
exec lighthouse boot_node \
|
||||||
--testnet-dir $TESTNET_DIR \
|
--testnet-dir $TESTNET_DIR \
|
||||||
--port $BOOTNODE_PORT \
|
--port $BOOTNODE_PORT \
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,14 @@ lcli \
|
||||||
--deposit-contract-address $ETH1_DEPOSIT_CONTRACT_ADDRESS \
|
--deposit-contract-address $ETH1_DEPOSIT_CONTRACT_ADDRESS \
|
||||||
--testnet-dir $TESTNET_DIR \
|
--testnet-dir $TESTNET_DIR \
|
||||||
--min-genesis-active-validator-count $GENESIS_VALIDATOR_COUNT \
|
--min-genesis-active-validator-count $GENESIS_VALIDATOR_COUNT \
|
||||||
|
--validator-count $VALIDATOR_COUNT \
|
||||||
--min-genesis-time $GENESIS_TIME \
|
--min-genesis-time $GENESIS_TIME \
|
||||||
--genesis-delay $GENESIS_DELAY \
|
--genesis-delay $GENESIS_DELAY \
|
||||||
--genesis-fork-version $GENESIS_FORK_VERSION \
|
--genesis-fork-version $GENESIS_FORK_VERSION \
|
||||||
--altair-fork-epoch $ALTAIR_FORK_EPOCH \
|
--altair-fork-epoch $ALTAIR_FORK_EPOCH \
|
||||||
--merge-fork-epoch $MERGE_FORK_EPOCH \
|
--bellatrix-fork-epoch $MERGE_FORK_EPOCH \
|
||||||
--eth1-id $ETH1_CHAIN_ID \
|
--eth1-id $ETH1_CHAIN_ID \
|
||||||
|
--eth1-block-hash $ETH1_BLOCK_HASH \
|
||||||
--eth1-follow-distance 1 \
|
--eth1-follow-distance 1 \
|
||||||
--seconds-per-slot $SECONDS_PER_SLOT \
|
--seconds-per-slot $SECONDS_PER_SLOT \
|
||||||
--seconds-per-eth1-block $SECONDS_PER_ETH1_BLOCK \
|
--seconds-per-eth1-block $SECONDS_PER_ETH1_BLOCK \
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,6 @@ GENESIS_VALIDATOR_COUNT=${GENESIS_VALIDATOR_COUNT:-80}
|
||||||
# Number of beacon_node instances that you intend to run
|
# Number of beacon_node instances that you intend to run
|
||||||
BN_COUNT=${BN_COUNT:-2}
|
BN_COUNT=${BN_COUNT:-2}
|
||||||
|
|
||||||
# Number of validator clients
|
|
||||||
VC_COUNT=${VC_COUNT:-$BN_COUNT}
|
|
||||||
|
|
||||||
# Number of seconds to delay to start genesis block.
|
# Number of seconds to delay to start genesis block.
|
||||||
# If started by a script this can be 0, if starting by hand
|
# If started by a script this can be 0, if starting by hand
|
||||||
# use something like 180.
|
# use something like 180.
|
||||||
|
|
@ -45,7 +42,9 @@ VC_ARGS=${VC_ARGS:-""}
|
||||||
EXECUTION_ENDPOINT=${EXECUTION_ENDPOINT:-http://localhost:8551}
|
EXECUTION_ENDPOINT=${EXECUTION_ENDPOINT:-http://localhost:8551}
|
||||||
|
|
||||||
ETH1_GENESIS_JSON=${ETH1_GENESIS_JSON:-"../build/el/geth.json"}
|
ETH1_GENESIS_JSON=${ETH1_GENESIS_JSON:-"../build/el/geth.json"}
|
||||||
|
ETH1_GENESIS_BLOCK_JSON=${ETH1_GENESIS_BLOCK_JSON:-"../build/el/genesis_block.json"}
|
||||||
ETH1_CONFIG_YAML=${ETH1_CONFIG_YAML:-"../el/el-config.yaml"}
|
ETH1_CONFIG_YAML=${ETH1_CONFIG_YAML:-"../el/el-config.yaml"}
|
||||||
|
ETH1_BLOCK_HASH=${ETH1_BLOCK_HASH:-`cat $ETH1_GENESIS_BLOCK_JSON | jq -r '.result.hash' | cut -d'x' -f2`}
|
||||||
|
|
||||||
ETH1_CHAIN_ID=${ETH1_CHAIN_ID:-`cat $ETH1_GENESIS_JSON | jq -r '.config.chainId'`}
|
ETH1_CHAIN_ID=${ETH1_CHAIN_ID:-`cat $ETH1_GENESIS_JSON | jq -r '.config.chainId'`}
|
||||||
ETH1_TTD=${ETH1_TTD:-`cat $ETH1_GENESIS_JSON | jq -r '.config.terminalTotalDifficulty'`}
|
ETH1_TTD=${ETH1_TTD:-`cat $ETH1_GENESIS_JSON | jq -r '.config.terminalTotalDifficulty'`}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,14 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MIN_BLOCK_NUM=${1:-${MIN_BLOCK_NUM:-3}}
|
MIN_BLOCK_NUM=${1:-${MIN_BLOCK_NUM:-3}}
|
||||||
STATUSES=("geth to generate DAG" "beacon phase0" "beacon altair" "beacon bellatrix pre-merge" "beacon bellatrix merge" "block number $MIN_BLOCK_NUM")
|
STATUSES=(
|
||||||
|
"geth to generate DAG"
|
||||||
|
"beacon phase0"
|
||||||
|
"beacon altair"
|
||||||
|
"beacon bellatrix pre-merge"
|
||||||
|
"beacon bellatrix merge"
|
||||||
|
"block number $MIN_BLOCK_NUM"
|
||||||
|
)
|
||||||
STATUS=0
|
STATUS=0
|
||||||
|
|
||||||
LIGHTHOUSE_BASE_URL=${LIGHTHOUSE_BASE_URL}
|
LIGHTHOUSE_BASE_URL=${LIGHTHOUSE_BASE_URL}
|
||||||
|
|
@ -36,7 +43,6 @@ MARKER="."
|
||||||
|
|
||||||
function inc_status() {
|
function inc_status() {
|
||||||
echo " done"
|
echo " done"
|
||||||
MARKEr="."
|
|
||||||
STATUS=$((STATUS + 1))
|
STATUS=$((STATUS + 1))
|
||||||
if [ $STATUS -lt ${#STATUSES[@]} ]; then
|
if [ $STATUS -lt ${#STATUSES[@]} ]; then
|
||||||
echo -n "Waiting for ${STATUSES[$STATUS]}..."
|
echo -n "Waiting for ${STATUSES[$STATUS]}..."
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||||
|
|
||||||
|
FROM golang:1.19.4-bullseye AS delve
|
||||||
|
RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||||
|
|
||||||
|
FROM ubuntu:22.04
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
python3 python3-dev python3-pip curl wget jq gettext gettext-base openssl bash dnsutils postgresql-client make iproute2 netcat && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY --from=delve /go/bin/dlv /usr/local/bin/
|
||||||
|
COPY --from=ethgen /usr/local/bin/eth2-testnet-genesis /usr/local/bin/
|
||||||
|
COPY --from=ethgen /usr/local/bin/eth2-val-tools /usr/local/bin/
|
||||||
|
COPY --from=ethgen /apps /apps
|
||||||
|
|
||||||
|
RUN wget -O /usr/local/bin/geth https://github.com/openrelayxyz/plugeth/releases/download/v1.11.6.1.0/geth-linux-amd64-v1.1.0-v1.11.6.1.0 && chmod a+x /usr/local/bin/geth
|
||||||
|
RUN cd /apps/el-gen && pip3 install -r requirements.txt
|
||||||
|
|
||||||
|
COPY genesis /opt/testnet
|
||||||
|
COPY run-el.sh /opt/testnet/run.sh
|
||||||
|
|
||||||
|
RUN cd /opt/testnet && make genesis-el
|
||||||
|
|
||||||
|
RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey
|
||||||
|
|
||||||
|
ENTRYPOINT ["/opt/testnet/run.sh"]
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build cerc/fixturenet-eth-plugeth
|
||||||
|
set -x
|
||||||
|
|
||||||
|
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||||
|
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
||||||
|
if [ ! -d "${SCRIPT_DIR}/genesis" ]; then
|
||||||
|
cp -frp ${SCRIPT_DIR}/../cerc-fixturenet-eth-geth/genesis ${SCRIPT_DIR}/genesis
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "${SCRIPT_DIR}/run-el.sh" ]; then
|
||||||
|
cp -fp ${SCRIPT_DIR}/../cerc-fixturenet-eth-geth/run-el.sh ${SCRIPT_DIR}/
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker build -t cerc/fixturenet-eth-plugeth:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} $SCRIPT_DIR
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
FROM cerc/lighthouse-cli:local AS lcli
|
||||||
|
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||||
|
FROM cerc/fixturenet-plugeth-plugeth:local AS fnetgeth
|
||||||
|
|
||||||
|
FROM cerc/lighthouse:local
|
||||||
|
|
||||||
|
# cerc/lighthouse is based on Ubuntu
|
||||||
|
RUN apt-get update && apt-get -y upgrade && apt-get install -y --no-install-recommends \
|
||||||
|
libssl-dev ca-certificates \
|
||||||
|
curl socat iproute2 telnet wget jq \
|
||||||
|
build-essential python3 python3-dev python3-pip gettext-base \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY genesis /opt/testnet
|
||||||
|
COPY run-cl.sh /opt/testnet/run.sh
|
||||||
|
|
||||||
|
COPY --from=lcli /usr/local/bin/lcli /usr/local/bin/lcli
|
||||||
|
COPY --from=ethgen /usr/local/bin/eth2-testnet-genesis /usr/local/bin/eth2-testnet-genesis
|
||||||
|
COPY --from=ethgen /usr/local/bin/eth2-val-tools /usr/local/bin/eth2-val-tools
|
||||||
|
COPY --from=ethgen /apps /apps
|
||||||
|
COPY --from=fnetgeth /opt/testnet/el /opt/testnet/el
|
||||||
|
COPY --from=fnetgeth /opt/testnet/build/el /opt/testnet/build/el
|
||||||
|
|
||||||
|
RUN cd /opt/testnet && make genesis-cl
|
||||||
|
|
||||||
|
# Work around some bugs in lcli where the default path is always used.
|
||||||
|
RUN mkdir -p /root/.lighthouse && cd /root/.lighthouse && ln -s /opt/testnet/build/cl/testnet
|
||||||
|
|
||||||
|
RUN mkdir -p /scripts
|
||||||
|
COPY scripts/status-internal.sh /scripts
|
||||||
|
COPY scripts/status.sh /scripts
|
||||||
|
|
||||||
|
ENTRYPOINT ["/opt/testnet/run.sh"]
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build cerc/fixturenet-plugeth-lighthouse
|
||||||
|
|
||||||
|
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||||
|
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
||||||
|
if [ ! -d "${SCRIPT_DIR}/genesis" ]; then
|
||||||
|
cp -frp ${SCRIPT_DIR}/../cerc-fixturenet-eth-lighthouse/genesis ${SCRIPT_DIR}/genesis
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e "${SCRIPT_DIR}/run-cl.sh" ]; then
|
||||||
|
cp -fp ${SCRIPT_DIR}/../cerc-fixturenet-eth-lighthouse/run-cl.sh ${SCRIPT_DIR}/
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "${SCRIPT_DIR}/scripts" ]; then
|
||||||
|
cp -frp ${SCRIPT_DIR}/../cerc-fixturenet-eth-lighthouse/scripts ${SCRIPT_DIR}/
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker build -t cerc/fixturenet-plugeth-lighthouse:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} $SCRIPT_DIR
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
|
||||||
|
|
||||||
|
FROM golang:1.19.4-bullseye AS delve
|
||||||
|
RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||||
|
|
||||||
|
FROM ubuntu:22.04
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
python3 python3-dev python3-pip curl wget jq gettext gettext-base openssl bash dnsutils postgresql-client make iproute2 netcat psmisc && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY --from=delve /go/bin/dlv /usr/local/bin/
|
||||||
|
COPY --from=ethgen /usr/local/bin/eth2-testnet-genesis /usr/local/bin/
|
||||||
|
COPY --from=ethgen /usr/local/bin/eth2-val-tools /usr/local/bin/
|
||||||
|
COPY --from=ethgen /apps /apps
|
||||||
|
|
||||||
|
RUN wget -O /usr/local/bin/geth https://github.com/openrelayxyz/plugeth/releases/download/v1.11.6.1.0/geth-linux-amd64-v1.1.0-v1.11.6.1.0 && chmod a+x /usr/local/bin/geth
|
||||||
|
RUN cd /apps/el-gen && pip3 install -r requirements.txt
|
||||||
|
|
||||||
|
COPY genesis /opt/testnet
|
||||||
|
COPY run-el.sh /opt/testnet/run.sh
|
||||||
|
|
||||||
|
RUN cd /opt/testnet && make genesis-el
|
||||||
|
|
||||||
|
RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey
|
||||||
|
|
||||||
|
# Snag the genesis block info.
|
||||||
|
RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey
|
||||||
|
RUN cp -rp ~/ethdata ~/tmpeth && \
|
||||||
|
geth --datadir ~/tmpeth init /opt/testnet/build/el/geth.json && \
|
||||||
|
geth --datadir ~/tmpeth --http & \
|
||||||
|
sleep 5 && \
|
||||||
|
curl -q --location 'localhost:8545' \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{ "jsonrpc": "2.0", "id": 14, "method": "eth_getBlockByNumber", "params": ["0x0", false] }' \
|
||||||
|
-o /opt/testnet/build/el/genesis_block.json && \
|
||||||
|
killall -9 geth && \
|
||||||
|
rm -rf ~/tmpeth
|
||||||
|
|
||||||
|
ENTRYPOINT ["/opt/testnet/run.sh"]
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build cerc/fixturenet-plugeth-plugeth
|
||||||
|
set -x
|
||||||
|
|
||||||
|
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||||
|
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
||||||
|
if [ ! -d "${SCRIPT_DIR}/genesis" ]; then
|
||||||
|
cp -frp ${SCRIPT_DIR}/../cerc-fixturenet-eth-geth/genesis ${SCRIPT_DIR}/genesis
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e "${SCRIPT_DIR}/run-el.sh" ]; then
|
||||||
|
cp -fp ${SCRIPT_DIR}/../cerc-fixturenet-eth-geth/run-el.sh ${SCRIPT_DIR}/
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker build -t cerc/fixturenet-plugeth-plugeth:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} $SCRIPT_DIR
|
||||||
|
|
@ -16,7 +16,7 @@ db-waitforsync=bool Should the statediff service start once geth has synced to
|
||||||
rpc-port=port change RPC port (default: 8545)
|
rpc-port=port change RPC port (default: 8545)
|
||||||
rpc-addr=address change RPC address (default: 127.0.0.1)
|
rpc-addr=address change RPC address (default: 127.0.0.1)
|
||||||
chain-id=number change chain ID (default: 99)
|
chain-id=number change chain ID (default: 99)
|
||||||
extra-args=name extra args to pass to geth on startup
|
extra-args=name extra args to pass to geth on startup
|
||||||
period=seconds use a block time instead of instamine
|
period=seconds use a block time instead of instamine
|
||||||
accounts=number create multiple accounts (default: 1)
|
accounts=number create multiple accounts (default: 1)
|
||||||
address=address eth address to add to genesis
|
address=address eth address to add to genesis
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build cerc/lighthouse-cli
|
||||||
|
|
||||||
|
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||||
|
|
||||||
|
project_dir=${CERC_REPO_BASE_DIR}/lighthouse
|
||||||
|
docker build -t cerc/lighthouse-cli:local --build-arg PORTABLE=true -f ${project_dir}/lcli/Dockerfile ${build_command_args} ${project_dir}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
FROM sigp/lighthouse:v4.1.0-modern
|
ARG TAG_SUFFIX="-modern"
|
||||||
|
FROM sigp/lighthouse:v4.1.0${TAG_SUFFIX}
|
||||||
|
|
||||||
RUN apt-get update; apt-get install bash netcat curl less jq -y;
|
RUN apt-get update; apt-get install bash netcat curl less jq -y;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,138 @@
|
||||||
|
#####################################
|
||||||
|
FROM golang:1.19.7-buster 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
|
||||||
|
|
||||||
|
ENV XDG_CACHE_HOME="/tmp"
|
||||||
|
|
||||||
|
### taken from https://github.com/rust-lang/docker-rust/blob/master/1.63.0/buster/Dockerfile
|
||||||
|
ENV RUSTUP_HOME=/usr/local/rustup \
|
||||||
|
CARGO_HOME=/usr/local/cargo \
|
||||||
|
PATH=/usr/local/cargo/bin:$PATH \
|
||||||
|
RUST_VERSION=1.63.0
|
||||||
|
|
||||||
|
RUN set -eux; \
|
||||||
|
dpkgArch="$(dpkg --print-architecture)"; \
|
||||||
|
case "${dpkgArch##*-}" in \
|
||||||
|
amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='5cc9ffd1026e82e7fb2eec2121ad71f4b0f044e88bca39207b3f6b769aaa799c' ;; \
|
||||||
|
arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='e189948e396d47254103a49c987e7fb0e5dd8e34b200aa4481ecc4b8e41fb929' ;; \
|
||||||
|
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
|
||||||
|
esac; \
|
||||||
|
url="https://static.rust-lang.org/rustup/archive/1.25.1/${rustArch}/rustup-init"; \
|
||||||
|
wget "$url"; \
|
||||||
|
echo "${rustupSha256} *rustup-init" | sha256sum -c -; \
|
||||||
|
chmod +x rustup-init; \
|
||||||
|
./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch}; \
|
||||||
|
rm rustup-init; \
|
||||||
|
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
|
||||||
|
rustup --version; \
|
||||||
|
cargo --version; \
|
||||||
|
rustc --version;
|
||||||
|
|
||||||
|
COPY ./ /opt/filecoin
|
||||||
|
WORKDIR /opt/filecoin
|
||||||
|
|
||||||
|
#RUN scripts/docker-git-state-check.sh
|
||||||
|
|
||||||
|
### make configurable filecoin-ffi build
|
||||||
|
ARG FFI_BUILD_FROM_SOURCE=0
|
||||||
|
ENV FFI_BUILD_FROM_SOURCE=${FFI_BUILD_FROM_SOURCE}
|
||||||
|
|
||||||
|
RUN make clean deps
|
||||||
|
|
||||||
|
ARG RUSTFLAGS=""
|
||||||
|
ARG GOFLAGS=""
|
||||||
|
|
||||||
|
#RUN make buildall
|
||||||
|
RUN make 2k
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
FROM ubuntu:20.04 AS lotus-base
|
||||||
|
MAINTAINER Lotus Development Team
|
||||||
|
|
||||||
|
# Base resources
|
||||||
|
COPY --from=lotus-builder /etc/ssl/certs /etc/ssl/certs
|
||||||
|
COPY --from=lotus-builder /lib/*/libdl.so.2 /lib/
|
||||||
|
COPY --from=lotus-builder /lib/*/librt.so.1 /lib/
|
||||||
|
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/*/libOpenCL.so.1 /lib/
|
||||||
|
|
||||||
|
RUN useradd -r -u 532 -U fc \
|
||||||
|
&& mkdir -p /etc/OpenCL/vendors \
|
||||||
|
&& echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
FROM lotus-base AS lotus
|
||||||
|
MAINTAINER Lotus Development Team
|
||||||
|
|
||||||
|
COPY --from=lotus-builder /opt/filecoin/lotus /usr/local/bin/
|
||||||
|
COPY --from=lotus-builder /opt/filecoin/lotus-shed /usr/local/bin/
|
||||||
|
#COPY scripts/docker-lotus-entrypoint.sh /
|
||||||
|
#COPY myscripts/setup-node.sh /docker-entrypoint-scripts.d/setup-node.sh
|
||||||
|
|
||||||
|
ARG DOCKER_LOTUS_IMPORT_SNAPSHOT https://snapshots.mainnet.filops.net/minimal/latest
|
||||||
|
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT ${DOCKER_LOTUS_IMPORT_SNAPSHOT}
|
||||||
|
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
||||||
|
ENV LOTUS_PATH /var/lib/lotus
|
||||||
|
ENV DOCKER_LOTUS_IMPORT_WALLET ""
|
||||||
|
|
||||||
|
RUN mkdir /var/lib/lotus /var/tmp/filecoin-proof-parameters
|
||||||
|
RUN chown fc: /var/lib/lotus /var/tmp/filecoin-proof-parameters
|
||||||
|
|
||||||
|
VOLUME /var/lib/lotus
|
||||||
|
VOLUME /var/tmp/filecoin-proof-parameters
|
||||||
|
|
||||||
|
USER fc
|
||||||
|
|
||||||
|
EXPOSE 1234
|
||||||
|
|
||||||
|
ENTRYPOINT ["/docker-lotus-entrypoint.sh"]
|
||||||
|
|
||||||
|
CMD ["-help"]
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
FROM lotus-base AS lotus-all-in-one
|
||||||
|
|
||||||
|
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
||||||
|
ENV LOTUS_MINER_PATH /var/lib/lotus-miner
|
||||||
|
ENV LOTUS_PATH /var/lib/lotus
|
||||||
|
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker
|
||||||
|
ENV WALLET_PATH /var/lib/lotus-wallet
|
||||||
|
|
||||||
|
COPY --from=lotus-builder /opt/filecoin/lotus /usr/local/bin/
|
||||||
|
COPY --from=lotus-builder /opt/filecoin/lotus-seed /usr/local/bin/
|
||||||
|
COPY --from=lotus-builder /opt/filecoin/lotus-shed /usr/local/bin/
|
||||||
|
#COPY --from=lotus-builder /opt/filecoin/lotus-wallet /usr/local/bin/
|
||||||
|
#COPY --from=lotus-builder /opt/filecoin/lotus-gateway /usr/local/bin/
|
||||||
|
COPY --from=lotus-builder /opt/filecoin/lotus-miner /usr/local/bin/
|
||||||
|
COPY --from=lotus-builder /opt/filecoin/lotus-worker /usr/local/bin/
|
||||||
|
#COPY --from=lotus-builder /opt/filecoin/lotus-stats /usr/local/bin/
|
||||||
|
#COPY --from=lotus-builder /opt/filecoin/lotus-fountain /usr/local/bin/
|
||||||
|
|
||||||
|
RUN mkdir /var/tmp/filecoin-proof-parameters
|
||||||
|
RUN mkdir /var/lib/lotus
|
||||||
|
RUN mkdir /var/lib/lotus-miner
|
||||||
|
RUN mkdir /var/lib/lotus-worker
|
||||||
|
RUN mkdir /var/lib/lotus-wallet
|
||||||
|
RUN chown fc: /var/tmp/filecoin-proof-parameters
|
||||||
|
RUN chown fc: /var/lib/lotus
|
||||||
|
RUN chown fc: /var/lib/lotus-miner
|
||||||
|
RUN chown fc: /var/lib/lotus-worker
|
||||||
|
RUN chown fc: /var/lib/lotus-wallet
|
||||||
|
|
||||||
|
|
||||||
|
#VOLUME /var/tmp/filecoin-proof-parameters
|
||||||
|
#VOLUME /var/lib/lotus
|
||||||
|
#VOLUME /var/lib/lotus-miner
|
||||||
|
#VOLUME /var/lib/lotus-worker
|
||||||
|
#VOLUME /var/lib/lotus-wallet
|
||||||
|
|
||||||
|
EXPOSE 1234
|
||||||
|
EXPOSE 2345
|
||||||
|
EXPOSE 3456
|
||||||
|
EXPOSE 1777
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build cerc/lotus
|
||||||
|
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
|
||||||
|
|
||||||
|
# Replace repo's Dockerfile with modified one
|
||||||
|
cp ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/lotus/Dockerfile
|
||||||
|
|
||||||
|
docker build -t cerc/lotus:local ${build_command_args} ${CERC_REPO_BASE_DIR}/lotus
|
||||||
|
|
@ -50,9 +50,9 @@ RUN yarn global add http-server
|
||||||
|
|
||||||
# Globally install both versions of the payload web app package
|
# Globally install both versions of the payload web app package
|
||||||
# Install old version of MobyMask web app
|
# Install old version of MobyMask web app
|
||||||
RUN yarn global add @cerc-io/mobymask-ui@0.1.3
|
RUN yarn global add @cerc-io/mobymask-ui@0.1.4
|
||||||
# Install the LXDAO version of MobyMask web app
|
# Install the LXDAO version of MobyMask web app
|
||||||
RUN yarn global add @cerc-io/mobymask-ui-lxdao@npm:@cerc-io/mobymask-ui@0.1.3-lxdao-0.1.1
|
RUN yarn global add @cerc-io/mobymask-ui-lxdao@npm:@cerc-io/mobymask-ui@0.1.4-lxdao-0.1.1
|
||||||
|
|
||||||
# Expose port for http
|
# Expose port for http
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ do
|
||||||
echo "Substituting: ${template_string_to_replace} = ${template_value_to_substitute}"
|
echo "Substituting: ${template_string_to_replace} = ${template_value_to_substitute}"
|
||||||
|
|
||||||
# TODO: Pass keys to be replaced without double quotes
|
# TODO: Pass keys to be replaced without double quotes
|
||||||
if [[ "$template_string_to_replace" =~ ^${config_prefix}_(relayNodes|chainId)$ ]]; then
|
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' {} +
|
find ${webapp_files_dir} -type f -exec sed -i 's#"'"${template_string_to_replace}"'"#'"${template_value_to_substitute}"'#g' {} +
|
||||||
else
|
else
|
||||||
# Note: we do not escape our strings, on the expectation they do not container the '#' char.
|
# Note: we do not escape our strings, on the expectation they do not container the '#' char.
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ RUN mkdir -p /config
|
||||||
RUN yarn global add http-server
|
RUN yarn global add http-server
|
||||||
|
|
||||||
# Globally install the payload web app package
|
# Globally install the payload web app package
|
||||||
RUN yarn global add @cerc-io/test-app@0.2.33
|
RUN yarn global add @cerc-io/test-app@0.2.34
|
||||||
|
|
||||||
# Expose port for http
|
# Expose port for http
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ do
|
||||||
echo "Substituting: ${template_string_to_replace} = ${template_value_to_substitute}"
|
echo "Substituting: ${template_string_to_replace} = ${template_value_to_substitute}"
|
||||||
|
|
||||||
# TODO: Pass keys to be replaced without double quotes
|
# TODO: Pass keys to be replaced without double quotes
|
||||||
if [[ "$template_string_to_replace" == "${config_prefix}_relayNodes" ]]; then
|
if [[ "$template_string_to_replace" =~ ^${config_prefix}_(relayNodes|denyMultiaddrs)$ ]]; then
|
||||||
find ${webapp_files_dir} -type f -exec sed -i 's#"'"${template_string_to_replace}"'"#'"${template_value_to_substitute}"'#g' {} +
|
find ${webapp_files_dir} -type f -exec sed -i 's#"'"${template_string_to_replace}"'"#'"${template_value_to_substitute}"'#g' {} +
|
||||||
else
|
else
|
||||||
# Note: we do not escape our strings, on the expectation they do not container the '#' char.
|
# Note: we do not escape our strings, on the expectation they do not container the '#' char.
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
# Test if the container's filesystem is old (run previously) or new
|
# Test if the container's filesystem is old (run previously) or new
|
||||||
EXISTSFILENAME=/var/exists
|
EXISTSFILENAME=/var/exists
|
||||||
echo "Test container starting"
|
echo "Test container starting"
|
||||||
if [[ -f "$EXISTSFILENAME" ]];
|
if [[ -f "$EXISTSFILENAME" ]];
|
||||||
then
|
then
|
||||||
TIMESTAMP = `cat $EXISTSFILENAME`
|
TIMESTAMP=`cat $EXISTSFILENAME`
|
||||||
echo "Filesystem is old, created: $TIMESTAMP"
|
echo "Filesystem is old, created: $TIMESTAMP"
|
||||||
else
|
else
|
||||||
echo "Filesystem is fresh"
|
echo "Filesystem is fresh"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
FROM node:18.15.0-alpine3.16
|
||||||
|
|
||||||
|
RUN apk --update --no-cache add git python3 alpine-sdk bash
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN echo "Building gelato-watcher-ts" && \
|
||||||
|
yarn && yarn build
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build cerc/watcher-gelato
|
||||||
|
|
||||||
|
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||||
|
|
||||||
|
# See: https://stackoverflow.com/a/246128/1701505
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
||||||
|
docker build -t cerc/watcher-gelato:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/gelato-watcher-ts
|
||||||
|
|
@ -15,6 +15,6 @@ WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN echo "Building mobymask-v2-watcher-ts" && \
|
RUN echo "Building mobymask-v2-watcher-ts" && \
|
||||||
yarn && yarn build
|
yarn && yarn build
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
|
||||||
|
|
@ -38,3 +38,6 @@ cerc/optimism-op-node
|
||||||
cerc/optimism-op-proposer
|
cerc/optimism-op-proposer
|
||||||
cerc/pocket
|
cerc/pocket
|
||||||
cerc/watcher-azimuth
|
cerc/watcher-azimuth
|
||||||
|
cerc/ipld-eth-state-snapshot
|
||||||
|
cerc/watcher-gelato
|
||||||
|
cerc/lotus
|
||||||
|
|
|
||||||
|
|
@ -26,3 +26,5 @@ foundry
|
||||||
fixturenet-optimism
|
fixturenet-optimism
|
||||||
fixturenet-pocket
|
fixturenet-pocket
|
||||||
watcher-azimuth
|
watcher-azimuth
|
||||||
|
watcher-gelato
|
||||||
|
fixturenet-lotus
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,36 @@
|
||||||
cerc-io/ipld-eth-db
|
github.com/cerc-io/ipld-eth-db
|
||||||
cerc-io/go-ethereum
|
github.com/cerc-io/go-ethereum
|
||||||
cerc-io/ipld-eth-server
|
github.com/cerc-io/ipld-eth-server
|
||||||
cerc-io/eth-statediff-service
|
github.com/cerc-io/eth-statediff-service
|
||||||
cerc-io/eth-statediff-fill-service
|
github.com/cerc-io/eth-statediff-fill-service
|
||||||
cerc-io/ipld-eth-db-validator
|
github.com/cerc-io/ipld-eth-db-validator
|
||||||
cerc-io/ipld-eth-beacon-indexer
|
github.com/cerc-io/ipld-eth-beacon-indexer
|
||||||
cerc-io/ipld-eth-beacon-db
|
github.com/cerc-io/ipld-eth-beacon-db
|
||||||
cerc-io/laconicd
|
github.com/cerc-io/laconicd
|
||||||
cerc-io/laconic-sdk
|
github.com/cerc-io/laconic-sdk
|
||||||
cerc-io/laconic-registry-cli
|
github.com/cerc-io/laconic-registry-cli
|
||||||
cerc-io/laconic-console
|
github.com/cerc-io/laconic-console
|
||||||
cerc-io/mobymask-watcher
|
github.com/cerc-io/mobymask-watcher
|
||||||
cerc-io/watcher-ts
|
github.com/cerc-io/watcher-ts
|
||||||
cerc-io/mobymask-v2-watcher-ts
|
github.com/cerc-io/mobymask-v2-watcher-ts
|
||||||
cerc-io/MobyMask
|
github.com/cerc-io/MobyMask
|
||||||
vulcanize/uniswap-watcher-ts
|
github.com/vulcanize/uniswap-watcher-ts
|
||||||
vulcanize/uniswap-v3-info
|
github.com/vulcanize/uniswap-v3-info
|
||||||
vulcanize/assemblyscript
|
github.com/vulcanize/assemblyscript
|
||||||
cerc-io/eth-probe
|
github.com/cerc-io/eth-probe
|
||||||
cerc-io/tx-spammer
|
github.com/cerc-io/tx-spammer
|
||||||
dboreham/foundry
|
github.com/dboreham/foundry
|
||||||
lirewine/gem
|
github.com/lirewine/gem
|
||||||
lirewine/debug
|
github.com/lirewine/debug
|
||||||
lirewine/crypto
|
github.com/lirewine/crypto
|
||||||
lirewine/sdk
|
github.com/lirewine/sdk
|
||||||
telackey/act_runner
|
github.com/telackey/act_runner
|
||||||
ethereum-optimism/op-geth
|
github.com/ethereum-optimism/op-geth
|
||||||
ethereum-optimism/optimism
|
github.com/ethereum-optimism/optimism
|
||||||
pokt-network/pocket-core
|
github.com/pokt-network/pocket-core
|
||||||
pokt-network/pocket-core-deployments
|
github.com/pokt-network/pocket-core-deployments
|
||||||
cerc-io/azimuth-watcher-ts
|
github.com/cerc-io/azimuth-watcher-ts
|
||||||
|
github.com/cerc-io/ipld-eth-state-snapshot
|
||||||
|
github.com/cerc-io/gelato-watcher-ts
|
||||||
|
github.com/filecoin-project/lotus
|
||||||
|
git.vdb.to/cerc-io/test-project
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Instructions to setup and deploy Azimuth Watcher stack
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
Prerequisite: ipld-eth-server RPC and GQL endpoints
|
Prerequisite: `ipld-eth-server` RPC and GQL endpoints
|
||||||
|
|
||||||
Clone required repositories:
|
Clone required repositories:
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ This should create the required docker images in the local image registry.
|
||||||
CERC_IPLD_ETH_GQL=
|
CERC_IPLD_ETH_GQL=
|
||||||
```
|
```
|
||||||
|
|
||||||
* NOTE: If ipld-eth-server is running on the host machine, use `host.docker.internal` as the hostname to access host ports
|
* NOTE: If `ipld-eth-server` is running on the host machine, use `host.docker.internal` as the hostname to access host ports
|
||||||
|
|
||||||
### Deploy the stack
|
### Deploy the stack
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
name: azimuth
|
name: azimuth
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/azimuth-watcher-ts
|
- github.com/cerc-io/azimuth-watcher-ts
|
||||||
containers:
|
containers:
|
||||||
- cerc/watcher-azimuth
|
- cerc/watcher-azimuth
|
||||||
pods:
|
pods:
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ $ laconic-so --stack package-registry deploy up
|
||||||
⠿ Container laconic-aecc4a21d3a502b14522db97d427e850-server-1 Started 1.9s
|
⠿ Container laconic-aecc4a21d3a502b14522db97d427e850-server-1 Started 1.9s
|
||||||
New user 'gitea_admin' has been successfully created!
|
New user 'gitea_admin' has been successfully created!
|
||||||
This is your gitea access token: 84fe66a73698bf11edbdccd0a338236b7d1d5c45. Keep it safe and secure, it can not be fetched again from gitea.
|
This is your gitea access token: 84fe66a73698bf11edbdccd0a338236b7d1d5c45. Keep it safe and secure, it can not be fetched again from gitea.
|
||||||
To use with laconic-so set this environment variable: export CERC_NPM_AUTH_TOKEN=3e493e77b3e83fe9e882f7e3a79dd4d5441c308b
|
To use with laconic-so set this environment variable: export CERC_NPM_AUTH_TOKEN=84fe66a73698bf11edbdccd0a338236b7d1d5c45
|
||||||
Created the organization cerc-io
|
Created the organization cerc-io
|
||||||
Gitea was configured to use host name: gitea.local, ensure that this resolves to localhost, e.g. with sudo vi /etc/hosts
|
Gitea was configured to use host name: gitea.local, ensure that this resolves to localhost, e.g. with sudo vi /etc/hosts
|
||||||
Success, gitea is properly initialized
|
Success, gitea is properly initialized
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
version: "1.0"
|
||||||
|
name: chain-chunker
|
||||||
|
decription: "Stack to build containers for chain-chunker"
|
||||||
|
repos:
|
||||||
|
- github.com/cerc-io/ipld-eth-state-snapshot@v5
|
||||||
|
- github.com/cerc-io/eth-statediff-service@v5
|
||||||
|
- github.com/cerc-io/ipld-eth-db@v5
|
||||||
|
- github.com/cerc-io/ipld-eth-server@v5
|
||||||
|
containers:
|
||||||
|
- cerc/ipld-eth-state-snapshot
|
||||||
|
- cerc/eth-statediff-service
|
||||||
|
- cerc/ipld-eth-db
|
||||||
|
- cerc/ipld-eth-server
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
name: erc20-watcher
|
name: erc20-watcher
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- cerc-io/ipld-eth-db
|
- github.com/cerc-io/ipld-eth-db
|
||||||
- cerc-io/ipld-eth-server
|
- github.com/cerc-io/ipld-eth-server
|
||||||
- cerc-io/watcher-ts
|
- github.com/cerc-io/watcher-ts
|
||||||
- dboreham/foundry
|
- github.com/dboreham/foundry
|
||||||
containers:
|
containers:
|
||||||
- cerc/foundry
|
- cerc/foundry
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
name: erc721-watcher
|
name: erc721-watcher
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- cerc-io/ipld-eth-db
|
- github.com/cerc-io/ipld-eth-db
|
||||||
- cerc-io/ipld-eth-server
|
- github.com/cerc-io/ipld-eth-server
|
||||||
- cerc-io/watcher-ts
|
- github.com/cerc-io/watcher-ts
|
||||||
containers:
|
containers:
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
- cerc/go-ethereum-foundry
|
- cerc/go-ethereum-foundry
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,15 @@ version: "1.0"
|
||||||
name: fixturenet-eth-loaded
|
name: fixturenet-eth-loaded
|
||||||
decription: "Loaded Ethereum Fixturenet"
|
decription: "Loaded Ethereum Fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- cerc-io/tx-spammer
|
- github.com/cerc-io/tx-spammer
|
||||||
- cerc-io/ipld-eth-server
|
- github.com/cerc-io/ipld-eth-server
|
||||||
- cerc-io/ipld-eth-db
|
- github.com/cerc-io/ipld-eth-db
|
||||||
- cerc/go-ethereum
|
- github.com/cerc-io/lighthouse
|
||||||
containers:
|
containers:
|
||||||
|
- cerc/go-ethereum
|
||||||
- cerc/lighthouse
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
- cerc/fixturenet-eth-geth
|
- cerc/fixturenet-eth-geth
|
||||||
- cerc/fixturenet-eth-lighthouse
|
- cerc/fixturenet-eth-lighthouse
|
||||||
- cerc/ipld-eth-server
|
- cerc/ipld-eth-server
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,14 @@ version: "1.2"
|
||||||
name: fixturenet-eth-tx
|
name: fixturenet-eth-tx
|
||||||
decription: "Ethereum Fixturenet w/ tx-spammer"
|
decription: "Ethereum Fixturenet w/ tx-spammer"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- cerc-io/tx-spammer
|
- github.com/cerc-io/tx-spammer
|
||||||
- dboreham/foundry
|
- github.com/dboreham/foundry
|
||||||
|
- github.com/cerc-io/lighthouse
|
||||||
containers:
|
containers:
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
- cerc/lighthouse
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
- cerc/fixturenet-eth-geth
|
- cerc/fixturenet-eth-geth
|
||||||
- cerc/fixturenet-eth-lighthouse
|
- cerc/fixturenet-eth-lighthouse
|
||||||
- cerc/tx-spammer
|
- cerc/tx-spammer
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# fixturenet-eth
|
# fixturenet-eth
|
||||||
|
|
||||||
Instructions for deploying a local a geth + lighthouse blockchain "fixturenet" for development and testing purposes using laconic-stack-orchestrator (the installation of which is covered [here](https://github.com/cerc-io/stack-orchestrator#user-mode)):
|
Instructions for deploying a local a geth + lighthouse blockchain "fixturenet" for development and testing purposes using laconic-stack-orchestrator (the installation of which is covered [here](https://github.com/cerc-io/stack-orchestrator)):
|
||||||
|
|
||||||
## Clone required repositories
|
## Clone required repositories
|
||||||
|
|
||||||
|
|
@ -66,7 +66,7 @@ It is not necessary to use them all at once, but a complete example follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
# Setup
|
# Setup
|
||||||
$ laconic-so setup-repositories --include cerc-io/go-ethereum,cerc-io/ipld-eth-db,cerc-io/ipld-eth-server,cerc-io/ipld-eth-beacon-db,cerc-io/ipld-eth-beacon-indexer,cerc-io/eth-probe,cerc-io/tx-spammer
|
$ laconic-so setup-repositories --include github.com/cerc-io/go-ethereum,github.com/cerc-io/ipld-eth-db,github.com/cerc-io/ipld-eth-server,github.com/cerc-io/ipld-eth-beacon-db,github.com/cerc-io/ipld-eth-beacon-indexer,github.com/cerc-io/eth-probe,github.com/cerc-io/tx-spammer
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
$ laconic-so build-containers --include cerc/go-ethereum,cerc/lighthouse,cerc/fixturenet-eth-geth,cerc/fixturenet-eth-lighthouse,cerc/ipld-eth-db,cerc/ipld-eth-server,cerc/ipld-eth-beacon-db,cerc/ipld-eth-beacon-indexer,cerc/eth-probe,cerc/keycloak,cerc/tx-spammer
|
$ laconic-so build-containers --include cerc/go-ethereum,cerc/lighthouse,cerc/fixturenet-eth-geth,cerc/fixturenet-eth-lighthouse,cerc/ipld-eth-db,cerc/ipld-eth-server,cerc/ipld-eth-beacon-db,cerc/ipld-eth-beacon-indexer,cerc/eth-probe,cerc/keycloak,cerc/tx-spammer
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,13 @@ version: "1.1"
|
||||||
name: fixturenet-eth
|
name: fixturenet-eth
|
||||||
decription: "Ethereum Fixturenet"
|
decription: "Ethereum Fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- dboreham/foundry
|
- github.com/cerc-io/lighthouse
|
||||||
|
- github.com/dboreham/foundry
|
||||||
containers:
|
containers:
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
- cerc/lighthouse
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
- cerc/fixturenet-eth-geth
|
- cerc/fixturenet-eth-geth
|
||||||
- cerc/fixturenet-eth-lighthouse
|
- cerc/fixturenet-eth-lighthouse
|
||||||
- cerc/foundry
|
- cerc/foundry
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,14 @@ version: "1.1"
|
||||||
name: fixturenet-laconic-loaded
|
name: fixturenet-laconic-loaded
|
||||||
description: "A full featured laconic fixturenet"
|
description: "A full featured laconic fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/laconicd
|
- github.com/cerc-io/laconicd
|
||||||
- lirewine/debug
|
- github.com/lirewine/debug
|
||||||
- lirewine/crypto
|
- github.com/lirewine/crypto
|
||||||
- lirewine/gem
|
- github.com/lirewine/gem
|
||||||
- lirewine/sdk
|
- github.com/lirewine/sdk
|
||||||
- cerc-io/laconic-sdk
|
- github.com/cerc-io/laconic-sdk
|
||||||
- cerc-io/laconic-registry-cli
|
- github.com/cerc-io/laconic-registry-cli
|
||||||
- cerc-io/laconic-console
|
- github.com/cerc-io/laconic-console
|
||||||
npms:
|
npms:
|
||||||
- laconic-sdk
|
- laconic-sdk
|
||||||
- laconic-registry-cli
|
- laconic-registry-cli
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@ version: "1.0"
|
||||||
name: fixturenet-laconicd
|
name: fixturenet-laconicd
|
||||||
description: "A laconicd fixturenet"
|
description: "A laconicd fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/laconicd
|
- github.com/cerc-io/laconicd
|
||||||
- cerc-io/laconic-sdk
|
- github.com/cerc-io/laconic-sdk
|
||||||
- cerc-io/laconic-registry-cli
|
- github.com/cerc-io/laconic-registry-cli
|
||||||
npms:
|
npms:
|
||||||
- laconic-sdk
|
- laconic-sdk
|
||||||
- laconic-registry-cli
|
- laconic-registry-cli
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Lotus Fixturenet
|
||||||
|
|
||||||
|
Instructions for deploying a local Lotus (Filecoin) chain for development and testing purposes using laconic-stack-orchestrator.
|
||||||
|
|
||||||
|
## 1. Clone required repositories
|
||||||
|
```
|
||||||
|
$ laconic-so --stack fixturenet-lotus setup-repositories
|
||||||
|
```
|
||||||
|
## 2. Build the stack's packages and containers
|
||||||
|
```
|
||||||
|
$ laconic-so --stack fixturenet-lotus build-containers
|
||||||
|
```
|
||||||
|
## 3. Deploy the stack
|
||||||
|
```
|
||||||
|
$ laconic-so --stack fixturenet-lotus deploy up
|
||||||
|
```
|
||||||
|
Correct operation should be verified by checking the container logs with:
|
||||||
|
```
|
||||||
|
$ laconic-so --stack fixturenet-lotus deploy logs lotus-miner
|
||||||
|
$ laconic-so --stack fixturenet-lotus deploy logs lotus-node-1
|
||||||
|
$ laconic-so --stack fixturenet-lotus deploy logs lotus-node-2
|
||||||
|
```
|
||||||
|
or by checking the chain status on each node:
|
||||||
|
```
|
||||||
|
$ laconic-so --stack fixturenet-lotus deploy exec lotus-miner "lotus status"
|
||||||
|
$ laconic-so --stack fixturenet-lotus deploy exec lotus-node-1 "lotus status"
|
||||||
|
$ laconic-so --stack fixturenet-lotus deploy exec lotus-node-2 "lotus status"
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
version: "1.0"
|
||||||
|
name: fixturenet-lotus
|
||||||
|
description: "A lotus fixturenet"
|
||||||
|
repos:
|
||||||
|
- github.com/filecoin-project/lotus
|
||||||
|
containers:
|
||||||
|
- cerc/lotus
|
||||||
|
pods:
|
||||||
|
- fixturenet-lotus
|
||||||
|
|
@ -14,14 +14,6 @@ laconic-so --stack fixturenet-optimism setup-repositories
|
||||||
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
|
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
|
||||||
```
|
```
|
||||||
|
|
||||||
Checkout to the required versions and branches in repos:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Optimism
|
|
||||||
cd ~/cerc/optimism
|
|
||||||
git checkout v1.0.4
|
|
||||||
```
|
|
||||||
|
|
||||||
Build the container images:
|
Build the container images:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -9,19 +9,11 @@ Prerequisite: An L1 Ethereum RPC endpoint
|
||||||
Clone required repositories:
|
Clone required repositories:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so --stack fixturenet-optimism setup-repositories --exclude cerc-io/go-ethereum
|
laconic-so --stack fixturenet-optimism setup-repositories --exclude github.com/cerc-io/go-ethereum
|
||||||
|
|
||||||
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
|
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
|
||||||
```
|
```
|
||||||
|
|
||||||
Checkout to the required versions and branches in repos:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Optimism
|
|
||||||
cd ~/cerc/optimism
|
|
||||||
git checkout v1.0.4
|
|
||||||
```
|
|
||||||
|
|
||||||
Build the container images:
|
Build the container images:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,15 @@ version: "1.0"
|
||||||
name: fixturenet-optimism
|
name: fixturenet-optimism
|
||||||
decription: "Optimism Fixturenet"
|
decription: "Optimism Fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- cerc-io/go-ethereum
|
- github.com/cerc-io/go-ethereum
|
||||||
- dboreham/foundry
|
- github.com/cerc-io/lighthouse
|
||||||
- ethereum-optimism/optimism
|
- github.com/dboreham/foundry
|
||||||
- ethereum-optimism/op-geth
|
- github.com/ethereum-optimism/optimism@v1.0.4
|
||||||
|
- github.com/ethereum-optimism/op-geth@v1.101105.2
|
||||||
containers:
|
containers:
|
||||||
- cerc/go-ethereum
|
- cerc/go-ethereum
|
||||||
- cerc/lighthouse
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
- cerc/fixturenet-eth-geth
|
- cerc/fixturenet-eth-geth
|
||||||
- cerc/fixturenet-eth-lighthouse
|
- cerc/fixturenet-eth-lighthouse
|
||||||
- cerc/foundry
|
- cerc/foundry
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
# fixturenet-plugeth-tx
|
||||||
|
|
||||||
|
A variation of `fixturenet-eth` that uses `plugeth` instead of `go-ethereum`.
|
||||||
|
|
||||||
|
See `stacks/fixturenet-eth/README.md` for more information.
|
||||||
|
|
||||||
|
## Containers
|
||||||
|
|
||||||
|
* cerc/lighthouse
|
||||||
|
* cerc/fixturenet-eth-plugeth
|
||||||
|
* cerc/fixturenet-eth-lighthouse
|
||||||
|
* cerc/tx-spammer
|
||||||
|
|
||||||
|
## Deploy the stack
|
||||||
|
```
|
||||||
|
$ laconic-so --stack fixturenet-plugeth-tx setup-repositories
|
||||||
|
$ laconic-so --stack fixturenet-plugeth-tx build-containers
|
||||||
|
$ laconic-so --stack fixturenet-plugeth-tx deploy up
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
version: "1.2"
|
||||||
|
name: fixturenet-plugeth-tx
|
||||||
|
decription: "plugeth Ethereum Fixturenet w/ tx-spammer"
|
||||||
|
repos:
|
||||||
|
- github.com/cerc-io/tx-spammer
|
||||||
|
- github.com/dboreham/foundry
|
||||||
|
- github.com/cerc-io/lighthouse
|
||||||
|
containers:
|
||||||
|
- cerc/lighthouse
|
||||||
|
- cerc/lighthouse-cli
|
||||||
|
- cerc/fixturenet-plugeth-plugeth
|
||||||
|
- cerc/fixturenet-plugeth-lighthouse
|
||||||
|
- cerc/tx-spammer
|
||||||
|
- cerc/foundry
|
||||||
|
pods:
|
||||||
|
- fixturenet-plugeth
|
||||||
|
- foundry
|
||||||
|
- tx-spammer
|
||||||
|
|
@ -1,41 +1,41 @@
|
||||||
# Pocket Fixturenet
|
# Pocket Fixturenet
|
||||||
|
|
||||||
Instructions for deploying a local single-node Pocket chain alongside a geth + lighthouse blockchain "fixturenet" for development and testing purposes using laconic-stack-orchestrator.
|
Instructions for deploying a local single-node Pocket chain alongside a geth + lighthouse blockchain "fixturenet" for development and testing purposes using Stack Orchestrator.
|
||||||
|
|
||||||
## 1. Build Laconic Stack Orchestrator
|
## 1. Clone required repositories
|
||||||
Build this fork of Laconic Stack Orchestrator which includes the fixturenet-pocket stack:
|
|
||||||
```
|
|
||||||
$ scripts/build_shiv_package.sh
|
|
||||||
$ cd package
|
|
||||||
$ mv laconic-so-{version} /usr/local/bin/laconic-so # Or move laconic-so to ~/bin or your favorite on-path directory
|
|
||||||
```
|
|
||||||
|
|
||||||
## 2. Clone required repositories
|
|
||||||
```
|
```
|
||||||
$ laconic-so --stack fixturenet-pocket setup-repositories
|
$ laconic-so --stack fixturenet-pocket setup-repositories
|
||||||
```
|
```
|
||||||
## 3. Build the stack's containers
|
## 2. Build the stack's containers
|
||||||
```
|
```
|
||||||
$ laconic-so --stack fixturenet-pocket build-containers
|
$ laconic-so --stack fixturenet-pocket build-containers
|
||||||
```
|
```
|
||||||
## 4. Deploy the stack
|
## 3. Deploy the stack
|
||||||
```
|
```
|
||||||
$ laconic-so --stack fixturenet-pocket deploy up
|
$ laconic-so --stack fixturenet-pocket deploy up
|
||||||
```
|
```
|
||||||
It may take up to 10 minutes for the Eth Fixturenet to fully come online and start producing blocks.
|
It may take up to 10 minutes for the Eth Fixturenet to fully come online and start producing blocks.
|
||||||
## 5. Check status
|
|
||||||
|
## 4. Check status
|
||||||
**Eth Fixturenet:**
|
**Eth Fixturenet:**
|
||||||
```
|
```
|
||||||
$ laconic-so --stack fixturenet-pocket deploy exec fixturenet-eth-bootnode-lighthouse /scripts/status-internal.sh
|
$ laconic-so --stack fixturenet-pocket deploy exec fixturenet-eth-bootnode-lighthouse /scripts/status-internal.sh
|
||||||
|
```
|
||||||
|
Response:
|
||||||
|
```
|
||||||
Waiting for geth to generate DAG.... done
|
Waiting for geth to generate DAG.... done
|
||||||
Waiting for beacon phase0.... done
|
Waiting for beacon phase0.... done
|
||||||
Waiting for beacon altair.... done
|
Waiting for beacon altair.... done
|
||||||
Waiting for beacon bellatrix pre-merge.... done
|
Waiting for beacon bellatrix pre-merge.... done
|
||||||
Waiting for beacon bellatrix merge.... done
|
Waiting for beacon bellatrix merge.... done
|
||||||
```
|
```
|
||||||
|
|
||||||
**Pocket node:**
|
**Pocket node:**
|
||||||
```
|
```
|
||||||
$ laconic-so --stack fixturenet-pocket deploy exec pocket "pocket query height"
|
$ laconic-so --stack fixturenet-pocket deploy exec pocket "pocket query height"
|
||||||
|
```
|
||||||
|
Response:
|
||||||
|
```
|
||||||
2023/04/20 08:07:46 Initializing Pocket Datadir
|
2023/04/20 08:07:46 Initializing Pocket Datadir
|
||||||
2023/04/20 08:07:46 datadir = /home/app/.pocket
|
2023/04/20 08:07:46 datadir = /home/app/.pocket
|
||||||
http://localhost:8081/v1/query/height
|
http://localhost:8081/v1/query/height
|
||||||
|
|
@ -43,17 +43,18 @@ http://localhost:8081/v1/query/height
|
||||||
"height": 4
|
"height": 4
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
or
|
or see the full logs:
|
||||||
```
|
```
|
||||||
$ laconic-so --stack fixturenet-pocket deploy logs pocket
|
$ laconic-so --stack fixturenet-pocket deploy logs pocket
|
||||||
```
|
```
|
||||||
## 6. Send a relay request to Pocket node
|
## 5. Send a relay request to Pocket node
|
||||||
The Pocket node serves relay requests at `http://localhost:8081/v1/client/sim`
|
The Pocket node serves relay requests at `http://localhost:8081/v1/client/sim`
|
||||||
**Example request:**
|
|
||||||
|
Example request:
|
||||||
```
|
```
|
||||||
$ curl -X POST --data '{"relay_network_id":"0021","payload":{"data":"{\"jsonrpc\": \"2.0\",\"id\": 1,\"method\": \"eth_blockNumber\",\"params\": []}","method":"POST","path":"","headers":{}}}' http://localhost:8081/v1/client/sim
|
$ curl -X POST --data '{"relay_network_id":"0021","payload":{"data":"{\"jsonrpc\": \"2.0\",\"id\": 1,\"method\": \"eth_blockNumber\",\"params\": []}","method":"POST","path":"","headers":{}}}' http://localhost:8081/v1/client/sim
|
||||||
```
|
```
|
||||||
**Response:**
|
Response:
|
||||||
```
|
```
|
||||||
"{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"0x6fe\"}\n"
|
"{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":\"0x6fe\"}\n"
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue