forked from cerc-io/stack-orchestrator
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e9a68dec3 |
@@ -1,36 +0,0 @@
|
|||||||
name: Fixturenet-Eth-Plugeth-Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: '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 an Ethereum plugeth fixturenet test"
|
|
||||||
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 fixturenet-eth tests"
|
|
||||||
run: ./tests/fixturenet-eth-plugeth/run-test.sh
|
|
||||||
@@ -4,11 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: 'ci-test'
|
branches: 'ci-test'
|
||||||
|
|
||||||
# Needed until we can incorporate docker startup into the executor container
|
|
||||||
env:
|
|
||||||
DOCKER_HOST: unix:///var/run/dind.sock
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: "Run an Ethereum fixturenet test"
|
name: "Run an Ethereum fixturenet test"
|
||||||
@@ -17,7 +12,7 @@ jobs:
|
|||||||
- name: "Clone project repository"
|
- name: "Clone project repository"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: "Install Python"
|
- name: "Install Python"
|
||||||
uses: actions/setup-python@v4
|
uses: cerc-io/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
- name: "Print Python version"
|
- name: "Print Python version"
|
||||||
@@ -28,10 +23,5 @@ jobs:
|
|||||||
run: ./scripts/create_build_tag_file.sh
|
run: ./scripts/create_build_tag_file.sh
|
||||||
- name: "Build local shiv package"
|
- name: "Build local shiv package"
|
||||||
run: ./scripts/build_shiv_package.sh
|
run: ./scripts/build_shiv_package.sh
|
||||||
- name: Start dockerd # Also needed until we can incorporate into the executor
|
|
||||||
run: |
|
|
||||||
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
|
||||||
sleep 5
|
|
||||||
- name: "Run fixturenet-eth tests"
|
- name: "Run fixturenet-eth tests"
|
||||||
run: ./tests/fixturenet-eth/run-test.sh
|
run: ./tests/fixturenet-eth/run-test.sh
|
||||||
|
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
name: Test Gitea
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: '*'
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- zach-test
|
|
||||||
- new-gitea-test
|
|
||||||
|
|
||||||
# Needed until we can incorporate docker startup into the executor container
|
|
||||||
env:
|
|
||||||
DOCKER_HOST: unix:///var/run/dind.sock
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: "Run Gitea package registry test"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: 'Update'
|
|
||||||
run: apt-get update
|
|
||||||
- name: 'Setup jq'
|
|
||||||
run: apt-get install jq -y
|
|
||||||
- name: 'Check jq'
|
|
||||||
run: |
|
|
||||||
which jq
|
|
||||||
jq --version
|
|
||||||
- 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: Start dockerd # Also needed until we can incorporate into the executor
|
|
||||||
run: |
|
|
||||||
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
|
||||||
sleep 5
|
|
||||||
- name: "Run gitea tests"
|
|
||||||
run: |
|
|
||||||
export CERC_SCRIPT_DEBUG=true &
|
|
||||||
./tests/gitea/test.sh
|
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ jobs:
|
|||||||
build_tag=$(./scripts/create_build_tag_file.sh)
|
build_tag=$(./scripts/create_build_tag_file.sh)
|
||||||
echo "build-tag=v${build_tag}" >> $GITHUB_OUTPUT
|
echo "build-tag=v${build_tag}" >> $GITHUB_OUTPUT
|
||||||
- name: "Install Python"
|
- name: "Install Python"
|
||||||
uses: actions/setup-python@v4
|
uses: cerc-io/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
- name: "Print Python version"
|
- name: "Print Python version"
|
||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cp ${{ steps.build.outputs.package-file }} ./laconic-so
|
cp ${{ steps.build.outputs.package-file }} ./laconic-so
|
||||||
- name: "Create release"
|
- name: "Create release"
|
||||||
uses: https://gitea.com/cerc-io/action-gh-release@gitea-v2
|
uses: cerc-io/action-gh-release@gitea-v1
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ steps.build-info.outputs.build-tag }}
|
tag_name: ${{ steps.build-info.outputs.build-tag }}
|
||||||
# On the publish test branch, mark our release as a draft
|
# On the publish test branch, mark our release as a draft
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
- name: "Clone project repository"
|
- name: "Clone project repository"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: "Install Python"
|
- name: "Install Python"
|
||||||
uses: actions/setup-python@v4
|
uses: cerc-io/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
- name: "Print Python version"
|
- name: "Print Python version"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
- name: "Clone project repository"
|
- name: "Clone project repository"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: "Install Python"
|
- name: "Install Python"
|
||||||
uses: actions/setup-python@v4
|
uses: cerc-io/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
- name: "Print Python version"
|
- name: "Print Python version"
|
||||||
@@ -37,4 +37,3 @@ jobs:
|
|||||||
sleep 5
|
sleep 5
|
||||||
- name: "Run smoke tests"
|
- name: "Run smoke tests"
|
||||||
run: ./tests/smoke-test/run-smoke-test.sh
|
run: ./tests/smoke-test/run-smoke-test.sh
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
name: Gitea Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: '*'
|
|
||||||
push:
|
|
||||||
branches: '*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: "Run basic 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 gitea tests"
|
|
||||||
run: ./tests/gitea/test.sh
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: Lint Checks
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: '*'
|
|
||||||
push:
|
|
||||||
branches: '*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: "Run linter"
|
|
||||||
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 : "Run flake8"
|
|
||||||
uses: py-actions/flake8@v2
|
|
||||||
@@ -6,7 +6,7 @@ Stack Orchestrator allows building and deployment of a Laconic Stack on a single
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
**To get started quickly** on a fresh Ubuntu instance (e.g, Digital Ocean); [try this script](./scripts/quick-install-linux.sh). **WARNING:** always review scripts prior to running them so that you know what is happening on your machine.
|
**To get started quickly** on a fresh Ubuntu instance (e.g, Digital Ocean); [try this script](./scripts/quick-install-ubuntu.sh). **WARNING:** always review scripts prior to running them so that you know what is happening on your machine.
|
||||||
|
|
||||||
For any other installation, follow along below and **adapt these instructions based on the specifics of your system.**
|
For any other installation, follow along below and **adapt these instructions based on the specifics of your system.**
|
||||||
|
|
||||||
@@ -16,7 +16,6 @@ Ensure that the following are already installed:
|
|||||||
- [Python3](https://wiki.python.org/moin/BeginnersGuide/Download): `python3 --version` >= `3.8.10` (the Python3 shipped in Ubuntu 20+ is good to go)
|
- [Python3](https://wiki.python.org/moin/BeginnersGuide/Download): `python3 --version` >= `3.8.10` (the Python3 shipped in Ubuntu 20+ is good to go)
|
||||||
- [Docker](https://docs.docker.com/get-docker/): `docker --version` >= `20.10.21`
|
- [Docker](https://docs.docker.com/get-docker/): `docker --version` >= `20.10.21`
|
||||||
- [jq](https://stedolan.github.io/jq/download/): `jq --version` >= `1.5`
|
- [jq](https://stedolan.github.io/jq/download/): `jq --version` >= `1.5`
|
||||||
- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git): `git --version` >= `2.10.3`
|
|
||||||
|
|
||||||
Note: if installing docker-compose via package manager on Linux (as opposed to Docker Desktop), you must [install the plugin](https://docs.docker.com/compose/install/linux/#install-the-plugin-manually), e.g. :
|
Note: if installing docker-compose via package manager on Linux (as opposed to Docker Desktop), you must [install the plugin](https://docs.docker.com/compose/install/linux/#install-the-plugin-manually), e.g. :
|
||||||
|
|
||||||
@@ -50,13 +49,6 @@ laconic-so version
|
|||||||
Version: 1.1.0-7a607c2-202304260513
|
Version: 1.1.0-7a607c2-202304260513
|
||||||
```
|
```
|
||||||
|
|
||||||
### Update
|
|
||||||
If Stack Orchestrator was installed using the process described above, it is able to subsequently self-update to the current latest version by running:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
laconic-so update
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
The various [stacks](/app/data/stacks) each contain instructions for running different stacks based on your use case. For example:
|
The various [stacks](/app/data/stacks) each contain instructions for running different stacks based on your use case. For example:
|
||||||
|
|||||||
+3
-14
@@ -1,4 +1,4 @@
|
|||||||
# Copyright © 2022, 2023 Vulcanize
|
# Copyright © 2022, 2023 Cerc
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as published by
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -15,8 +15,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from app.deploy import get_stack_status
|
from .deploy_system import get_stack_status
|
||||||
from decouple import config
|
|
||||||
|
|
||||||
|
|
||||||
def get_stack(config, stack):
|
def get_stack(config, stack):
|
||||||
@@ -63,20 +62,10 @@ class package_registry_stack(base_stack):
|
|||||||
self.url = "http://gitea.local:3000/api/packages/cerc-io/npm/"
|
self.url = "http://gitea.local:3000/api/packages/cerc-io/npm/"
|
||||||
else:
|
else:
|
||||||
# If not, print a message about how to start it and return fail to the caller
|
# If not, print a message about how to start it and return fail to the caller
|
||||||
print("ERROR: The package-registry stack is not running, and no external registry "
|
print("ERROR: The package-registry stack is not running, and no external registry specified with CERC_NPM_REGISTRY_URL")
|
||||||
"specified with CERC_NPM_REGISTRY_URL")
|
|
||||||
print("ERROR: Start the local package registry with: laconic-so --stack package-registry deploy-system up")
|
print("ERROR: Start the local package registry with: laconic-so --stack package-registry deploy-system up")
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def get_url(self):
|
def get_url(self):
|
||||||
return self.url
|
return self.url
|
||||||
|
|
||||||
|
|
||||||
def get_npm_registry_url():
|
|
||||||
# If an auth token is not defined, we assume the default should be the cerc registry
|
|
||||||
# If an auth token is defined, we assume the local gitea should be used.
|
|
||||||
default_npm_registry_url = "http://gitea.local:3000/api/packages/cerc-io/npm/" if config(
|
|
||||||
"CERC_NPM_AUTH_TOKEN", default=None
|
|
||||||
) else "https://git.vdb.to/api/packages/cerc-io/npm/"
|
|
||||||
return config("CERC_NPM_REGISTRY_URL", default=default_npm_registry_url)
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright © 2022, 2023 Vulcanize
|
# Copyright © 2022, 2023 Cerc
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as published by
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -27,8 +27,7 @@ import subprocess
|
|||||||
import click
|
import click
|
||||||
import importlib.resources
|
import importlib.resources
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from app.util import include_exclude_check, get_parsed_stack_config
|
from .util import include_exclude_check, get_parsed_stack_config
|
||||||
from app.base import get_npm_registry_url
|
|
||||||
|
|
||||||
# TODO: find a place for this
|
# TODO: find a place for this
|
||||||
# epilog="Config provided either in .env or settings.ini or env vars: CERC_REPO_BASE_DIR (defaults to ~/cerc)"
|
# epilog="Config provided either in .env or settings.ini or env vars: CERC_REPO_BASE_DIR (defaults to ~/cerc)"
|
||||||
@@ -67,7 +66,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
|||||||
print('Dev root directory doesn\'t exist, creating')
|
print('Dev root directory doesn\'t exist, creating')
|
||||||
|
|
||||||
# See: https://stackoverflow.com/a/20885799/1701505
|
# See: https://stackoverflow.com/a/20885799/1701505
|
||||||
from app import data
|
from . import data
|
||||||
with importlib.resources.open_text(data, "container-image-list.txt") as container_list_file:
|
with importlib.resources.open_text(data, "container-image-list.txt") as container_list_file:
|
||||||
all_containers = container_list_file.read().splitlines()
|
all_containers = container_list_file.read().splitlines()
|
||||||
|
|
||||||
@@ -85,8 +84,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
|||||||
|
|
||||||
# TODO: make this configurable
|
# TODO: make this configurable
|
||||||
container_build_env = {
|
container_build_env = {
|
||||||
"CERC_NPM_REGISTRY_URL": get_npm_registry_url(),
|
"CERC_NPM_REGISTRY_URL": config("CERC_NPM_REGISTRY_URL", default="http://gitea.local:3000/api/packages/cerc-io/npm/"),
|
||||||
"CERC_GO_AUTH_TOKEN": config("CERC_GO_AUTH_TOKEN", default=""),
|
|
||||||
"CERC_NPM_AUTH_TOKEN": config("CERC_NPM_AUTH_TOKEN", default=""),
|
"CERC_NPM_AUTH_TOKEN": config("CERC_NPM_AUTH_TOKEN", default=""),
|
||||||
"CERC_REPO_BASE_DIR": dev_root_path,
|
"CERC_REPO_BASE_DIR": dev_root_path,
|
||||||
"CERC_CONTAINER_BASE_DIR": container_build_dir,
|
"CERC_CONTAINER_BASE_DIR": container_build_dir,
|
||||||
|
|||||||
+8
-10
@@ -1,4 +1,4 @@
|
|||||||
# Copyright © 2022, 2023 Vulcanize
|
# Copyright © 2022, 2023 Cerc
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as published by
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
@@ -25,17 +25,15 @@ from decouple import config
|
|||||||
import click
|
import click
|
||||||
import importlib.resources
|
import importlib.resources
|
||||||
from python_on_whales import docker, DockerException
|
from python_on_whales import docker, DockerException
|
||||||
from app.base import get_stack
|
from .base import get_stack
|
||||||
from app.util import include_exclude_check, get_parsed_stack_config
|
from .util import include_exclude_check, get_parsed_stack_config
|
||||||
|
|
||||||
builder_js_image_name = "cerc/builder-js:local"
|
builder_js_image_name = "cerc/builder-js:local"
|
||||||
|
|
||||||
|
|
||||||
@click.command()
|
@click.command()
|
||||||
@click.option('--include', help="only build these packages")
|
@click.option('--include', help="only build these packages")
|
||||||
@click.option('--exclude', help="don\'t build these packages")
|
@click.option('--exclude', help="don\'t build these packages")
|
||||||
@click.option("--force-rebuild", is_flag=True, default=False,
|
@click.option("--force-rebuild", is_flag=True, default=False, help="Override existing target package version check -- force rebuild")
|
||||||
help="Override existing target package version check -- force rebuild")
|
|
||||||
@click.option("--extra-build-args", help="Supply extra arguments to build")
|
@click.option("--extra-build-args", help="Supply extra arguments to build")
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
||||||
@@ -83,7 +81,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
|||||||
os.makedirs(build_root_path)
|
os.makedirs(build_root_path)
|
||||||
|
|
||||||
# See: https://stackoverflow.com/a/20885799/1701505
|
# See: https://stackoverflow.com/a/20885799/1701505
|
||||||
from app import data
|
from . import data
|
||||||
with importlib.resources.open_text(data, "npm-package-list.txt") as package_list_file:
|
with importlib.resources.open_text(data, "npm-package-list.txt") as package_list_file:
|
||||||
all_packages = package_list_file.read().splitlines()
|
all_packages = package_list_file.read().splitlines()
|
||||||
|
|
||||||
@@ -124,7 +122,7 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
|||||||
# envs = {"CERC_NPM_AUTH_TOKEN": npm_registry_url_token} | ({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
|
# envs = {"CERC_NPM_AUTH_TOKEN": npm_registry_url_token} | ({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
|
||||||
# but that isn't available in Python 3.8 (default in Ubuntu 20) so for now we use dict.update:
|
# but that isn't available in Python 3.8 (default in Ubuntu 20) so for now we use dict.update:
|
||||||
envs = {"CERC_NPM_AUTH_TOKEN": npm_registry_url_token,
|
envs = {"CERC_NPM_AUTH_TOKEN": npm_registry_url_token,
|
||||||
"LACONIC_HOSTED_CONFIG_FILE": "config-hosted.yml" # Convention used by our web app packages
|
"LACONIC_HOSTED_CONFIG_FILE": "config-hosted.yml" # Convention used by our web app packages
|
||||||
}
|
}
|
||||||
envs.update({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
|
envs.update({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
|
||||||
envs.update({"CERC_FORCE_REBUILD": "true"} if force_rebuild else {})
|
envs.update({"CERC_FORCE_REBUILD": "true"} if force_rebuild else {})
|
||||||
@@ -132,8 +130,8 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
|
|||||||
try:
|
try:
|
||||||
docker.run(builder_js_image_name,
|
docker.run(builder_js_image_name,
|
||||||
remove=True,
|
remove=True,
|
||||||
interactive=False,
|
interactive=True,
|
||||||
tty=False,
|
tty=True,
|
||||||
user=f"{os.getuid()}:{os.getgid()}",
|
user=f"{os.getuid()}:{os.getgid()}",
|
||||||
envs=envs,
|
envs=envs,
|
||||||
# TODO: detect this host name in npm_registry_url rather than hard-wiring it
|
# TODO: detect this host name in npm_registry_url rather than hard-wiring it
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
# Copyright © 2023 Vulcanize
|
|
||||||
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as published by
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
from dataclasses import dataclass
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class CommandOptions:
|
|
||||||
stack: str
|
|
||||||
quiet: bool = False
|
|
||||||
verbose: bool = False
|
|
||||||
dry_run: bool = False
|
|
||||||
local_stack: bool = False
|
|
||||||
debug: bool = False
|
|
||||||
continue_on_error: bool = False
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
version: '3.2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
# Deploys the core (UniswapV3Factory) contract
|
|
||||||
sushiswap-v3-core:
|
|
||||||
image: cerc/sushiswap-v3-core:local
|
|
||||||
restart: on-failure
|
|
||||||
env_file:
|
|
||||||
# Defaults
|
|
||||||
- ../config/contract-sushiswap/deployment-params.env
|
|
||||||
environment:
|
|
||||||
# Overrides
|
|
||||||
CERC_ETH_RPC_ENDPOINT: ${ETH_RPC_ENDPOINT}
|
|
||||||
CERC_CHAIN_ID: ${CHAIN_ID}
|
|
||||||
CERC_ACCOUNT_PRIVATE_KEY: ${ACCOUNT_PRIVATE_KEY}
|
|
||||||
CERC_DEPLOY: ${DEPLOY}
|
|
||||||
volumes:
|
|
||||||
- ../config/network/wait-for-it.sh:/app/wait-for-it.sh
|
|
||||||
- ../config/contract-sushiswap/deploy-core-contracts.sh:/app/deploy-core-contracts.sh
|
|
||||||
- sushiswap_core_deployment:/app/deployments/docker
|
|
||||||
command: ["bash", "-c", "/app/deploy-core-contracts.sh && tail -f"]
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
|
|
||||||
# Deploys the periphery (NFPM, token, etc.) contracts
|
|
||||||
sushiswap-v3-periphery:
|
|
||||||
image: cerc/sushiswap-v3-periphery:local
|
|
||||||
restart: on-failure
|
|
||||||
env_file:
|
|
||||||
# Defaults
|
|
||||||
- ../config/contract-sushiswap/deployment-params.env
|
|
||||||
environment:
|
|
||||||
# Overrides
|
|
||||||
CERC_ETH_RPC_ENDPOINT: ${ETH_RPC_ENDPOINT}
|
|
||||||
CERC_CHAIN_ID: ${CHAIN_ID}
|
|
||||||
CERC_ACCOUNT_PRIVATE_KEY: ${ACCOUNT_PRIVATE_KEY}
|
|
||||||
CERC_DEPLOY: ${DEPLOY}
|
|
||||||
volumes:
|
|
||||||
- ../config/network/wait-for-it.sh:/app/wait-for-it.sh
|
|
||||||
- ../config/contract-sushiswap/deploy-periphery-contracts.sh:/app/deploy-periphery-contracts.sh
|
|
||||||
- sushiswap_core_deployment:/app/core-deployments/docker
|
|
||||||
- sushiswap_periphery_deployment:/app/deployments/docker
|
|
||||||
command: ["bash", "-c", "/app/deploy-periphery-contracts.sh && tail -f"]
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
sushiswap_core_deployment:
|
|
||||||
sushiswap_periphery_deployment:
|
|
||||||
@@ -21,7 +21,7 @@ services:
|
|||||||
cap_add:
|
cap_add:
|
||||||
- SYS_PTRACE
|
- SYS_PTRACE
|
||||||
environment:
|
environment:
|
||||||
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
CERC_REMOTE_DEBUG: "true"
|
||||||
CERC_RUN_STATEDIFF: ${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}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: cerc/laconic-console-host:local
|
image: cerc/laconic-console-host:local
|
||||||
environment:
|
environment:
|
||||||
- CERC_WEBAPP_FILES_DIR=${CERC_WEBAPP_FILES_DIR:-/usr/local/share/.config/yarn/global/node_modules/@cerc-io/console-app/dist/production}
|
|
||||||
- LACONIC_HOSTED_ENDPOINT=${LACONIC_HOSTED_ENDPOINT:-http://localhost}
|
- LACONIC_HOSTED_ENDPOINT=${LACONIC_HOSTED_ENDPOINT:-http://localhost}
|
||||||
ports:
|
ports:
|
||||||
- "80"
|
- "80"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ services:
|
|||||||
- "6060"
|
- "6060"
|
||||||
- "26657"
|
- "26657"
|
||||||
- "26656"
|
- "26656"
|
||||||
- "9473"
|
- "9473:9473"
|
||||||
- "8545"
|
- "8545"
|
||||||
- "8546"
|
- "8546"
|
||||||
- "9090"
|
- "9090"
|
||||||
@@ -25,6 +25,3 @@ services:
|
|||||||
image: cerc/laconic-registry-cli:local
|
image: cerc/laconic-registry-cli:local
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/fixturenet-laconicd/registry-cli-config-template.yml:/registry-cli-config-template.yml
|
- ../config/fixturenet-laconicd/registry-cli-config-template.yml:/registry-cli-config-template.yml
|
||||||
|
|
||||||
volumes:
|
|
||||||
laconicd-data:
|
|
||||||
|
|||||||
@@ -8,10 +8,17 @@ services:
|
|||||||
image: cerc/lotus:local
|
image: cerc/lotus:local
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/fixturenet-lotus/setup-miner.sh:/docker-entrypoint-scripts.d/setup-miner.sh
|
- ../config/fixturenet-lotus/setup-miner.sh:/docker-entrypoint-scripts.d/setup-miner.sh
|
||||||
- ../config/fixturenet-lotus/fund-account.sh:/fund-account.sh
|
- ../config/fixturenet-lotus/genesis/devgen.car:/devgen.car
|
||||||
- lotus_miner_params:/var/tmp/filecoin-proof-parameters
|
- $HOME/stack-orchestrator/app/data/config/fixturenet-lotus/genesis/.genesis-sectors:/root/.genesis-sectors
|
||||||
- lotus_shared:/root/.lotus-shared
|
- lotus-shared:/root/.lotus-shared
|
||||||
- lotus_miner_data:/root/data
|
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"]
|
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-miner.sh"]
|
||||||
ports:
|
ports:
|
||||||
- "1234"
|
- "1234"
|
||||||
@@ -23,23 +30,14 @@ services:
|
|||||||
hostname: lotus-node-1
|
hostname: lotus-node-1
|
||||||
env_file:
|
env_file:
|
||||||
- ../config/fixturenet-lotus/lotus-env.env
|
- ../config/fixturenet-lotus/lotus-env.env
|
||||||
environment:
|
|
||||||
# Use 0.0.0.0 so that calls can be made from outside the container
|
|
||||||
- LOTUS_API_LISTENADDRESS=/ip4/0.0.0.0/tcp/1234/http
|
|
||||||
image: cerc/lotus:local
|
image: cerc/lotus:local
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/fixturenet-lotus/setup-node.sh:/docker-entrypoint-scripts.d/setup-node.sh
|
- ../config/fixturenet-lotus/setup-node.sh:/docker-entrypoint-scripts.d/setup-node.sh
|
||||||
- lotus_node_1_params:/var/tmp/filecoin-proof-parameters
|
- ../config/fixturenet-lotus/genesis/devgen.car:/devgen.car
|
||||||
- lotus_shared:/root/.lotus-shared
|
- lotus-shared:/root/.lotus-shared
|
||||||
- lotus_node_1_data:/root/data
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-vz", "localhost", "1234"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 60
|
|
||||||
start_period: 3s
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- lotus-miner
|
lotus-miner:
|
||||||
|
condition: service_healthy
|
||||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
||||||
ports:
|
ports:
|
||||||
- "1234"
|
- "1234"
|
||||||
@@ -51,23 +49,14 @@ services:
|
|||||||
hostname: lotus-node-2
|
hostname: lotus-node-2
|
||||||
env_file:
|
env_file:
|
||||||
- ../config/fixturenet-lotus/lotus-env.env
|
- ../config/fixturenet-lotus/lotus-env.env
|
||||||
environment:
|
|
||||||
# Use 0.0.0.0 so that calls can be made from outside the container
|
|
||||||
- LOTUS_API_LISTENADDRESS=/ip4/0.0.0.0/tcp/1234/http
|
|
||||||
image: cerc/lotus:local
|
image: cerc/lotus:local
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/fixturenet-lotus/setup-node.sh:/docker-entrypoint-scripts.d/setup-node.sh
|
- ../config/fixturenet-lotus/setup-node.sh:/docker-entrypoint-scripts.d/setup-node.sh
|
||||||
- lotus_node_2_params:/var/tmp/filecoin-proof-parameters
|
- ../config/fixturenet-lotus/genesis/devgen.car:/devgen.car
|
||||||
- lotus_shared:/root/.lotus-shared
|
- lotus-shared:/root/.lotus-shared
|
||||||
- lotus_node_2_data:/root/data
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-vz", "localhost", "1234"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 60
|
|
||||||
start_period: 3s
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- lotus-miner
|
lotus-miner:
|
||||||
|
condition: service_healthy
|
||||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
entrypoint: ["sh", "/docker-entrypoint-scripts.d/setup-node.sh"]
|
||||||
ports:
|
ports:
|
||||||
- "1234"
|
- "1234"
|
||||||
@@ -76,10 +65,4 @@ services:
|
|||||||
- "1777"
|
- "1777"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
lotus_miner_params:
|
lotus-shared:
|
||||||
lotus_node_1_params:
|
|
||||||
lotus_node_2_params:
|
|
||||||
lotus_shared:
|
|
||||||
lotus_miner_data:
|
|
||||||
lotus_node_1_data:
|
|
||||||
lotus_node_2_data:
|
|
||||||
@@ -23,10 +23,10 @@ services:
|
|||||||
command: |
|
command: |
|
||||||
"./wait-for-it.sh -h ${CERC_L1_HOST:-$${DEFAULT_CERC_L1_HOST}} -p ${CERC_L1_PORT:-$${DEFAULT_CERC_L1_PORT}} -s -t 60 -- ./run.sh"
|
"./wait-for-it.sh -h ${CERC_L1_HOST:-$${DEFAULT_CERC_L1_HOST}} -p ${CERC_L1_PORT:-$${DEFAULT_CERC_L1_PORT}} -s -t 60 -- ./run.sh"
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/network/wait-for-it.sh:/app/packages/contracts-bedrock/wait-for-it.sh
|
- ../config/wait-for-it.sh:/app/packages/contracts-bedrock/wait-for-it.sh
|
||||||
- ../config/optimism-contracts/hardhat-tasks/verify-contract-deployment.ts:/app/packages/contracts-bedrock/tasks/verify-contract-deployment.ts
|
- ../container-build/cerc-optimism-contracts/hardhat-tasks/verify-contract-deployment.ts:/app/packages/contracts-bedrock/tasks/verify-contract-deployment.ts
|
||||||
- ../config/optimism-contracts/hardhat-tasks/rekey-json.ts:/app/packages/contracts-bedrock/tasks/rekey-json.ts
|
- ../container-build/cerc-optimism-contracts/hardhat-tasks/rekey-json.ts:/app/packages/contracts-bedrock/tasks/rekey-json.ts
|
||||||
- ../config/optimism-contracts/hardhat-tasks/send-balance.ts:/app/packages/contracts-bedrock/tasks/send-balance.ts
|
- ../container-build/cerc-optimism-contracts/hardhat-tasks/send-balance.ts:/app/packages/contracts-bedrock/tasks/send-balance.ts
|
||||||
- ../config/fixturenet-optimism/optimism-contracts/update-config.js:/app/packages/contracts-bedrock/update-config.js
|
- ../config/fixturenet-optimism/optimism-contracts/update-config.js:/app/packages/contracts-bedrock/update-config.js
|
||||||
- ../config/fixturenet-optimism/optimism-contracts/run.sh:/app/packages/contracts-bedrock/run.sh
|
- ../config/fixturenet-optimism/optimism-contracts/run.sh:/app/packages/contracts-bedrock/run.sh
|
||||||
- l2_accounts:/l2-accounts
|
- l2_accounts:/l2-accounts
|
||||||
@@ -120,7 +120,7 @@ services:
|
|||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
CERC_L1_RPC: ${CERC_L1_RPC}
|
CERC_L1_RPC: ${CERC_L1_RPC}
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/network/wait-for-it.sh:/wait-for-it.sh
|
- ../config/wait-for-it.sh:/wait-for-it.sh
|
||||||
- ../config/fixturenet-optimism/run-op-batcher.sh:/run-op-batcher.sh
|
- ../config/fixturenet-optimism/run-op-batcher.sh:/run-op-batcher.sh
|
||||||
- l2_accounts:/l2-accounts:ro
|
- l2_accounts:/l2-accounts:ro
|
||||||
entrypoint: ["sh", "-c"]
|
entrypoint: ["sh", "-c"]
|
||||||
@@ -145,7 +145,7 @@ services:
|
|||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
CERC_L1_RPC: ${CERC_L1_RPC}
|
CERC_L1_RPC: ${CERC_L1_RPC}
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/network/wait-for-it.sh:/wait-for-it.sh
|
- ../config/wait-for-it.sh:/wait-for-it.sh
|
||||||
- ../config/fixturenet-optimism/run-op-proposer.sh:/run-op-proposer.sh
|
- ../config/fixturenet-optimism/run-op-proposer.sh:/run-op-proposer.sh
|
||||||
- l1_deployment:/contracts-bedrock:ro
|
- l1_deployment:/contracts-bedrock:ro
|
||||||
- l2_accounts:/l2-accounts:ro
|
- l2_accounts:/l2-accounts:ro
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ services:
|
|||||||
image: cerc/fixturenet-plugeth-plugeth:local
|
image: cerc/fixturenet-plugeth-plugeth:local
|
||||||
volumes:
|
volumes:
|
||||||
- fixturenet_plugeth_bootnode_geth_data:/root/ethdata
|
- fixturenet_plugeth_bootnode_geth_data:/root/ethdata
|
||||||
|
- ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins
|
||||||
ports:
|
ports:
|
||||||
- "9898"
|
- "9898"
|
||||||
- "30303"
|
- "30303"
|
||||||
@@ -19,8 +20,8 @@ services:
|
|||||||
cap_add:
|
cap_add:
|
||||||
- SYS_PTRACE
|
- SYS_PTRACE
|
||||||
environment:
|
environment:
|
||||||
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
CERC_REMOTE_DEBUG: "true"
|
||||||
CERC_RUN_STATEDIFF: ${CERC_RUN_STATEDIFF:-detect}
|
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:
|
||||||
@@ -28,6 +29,7 @@ services:
|
|||||||
image: cerc/fixturenet-plugeth-plugeth:local
|
image: cerc/fixturenet-plugeth-plugeth:local
|
||||||
volumes:
|
volumes:
|
||||||
- fixturenet_plugeth_geth_1_data:/root/ethdata
|
- fixturenet_plugeth_geth_1_data:/root/ethdata
|
||||||
|
- ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8545/"]
|
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8545/"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@@ -59,13 +61,14 @@ services:
|
|||||||
- fixturenet-eth-bootnode-geth
|
- fixturenet-eth-bootnode-geth
|
||||||
volumes:
|
volumes:
|
||||||
- fixturenet_plugeth_geth_2_data:/root/ethdata
|
- fixturenet_plugeth_geth_2_data:/root/ethdata
|
||||||
|
- ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins
|
||||||
|
|
||||||
fixturenet-eth-bootnode-lighthouse:
|
fixturenet-eth-bootnode-lighthouse:
|
||||||
restart: always
|
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-plugeth-lighthouse:local
|
||||||
|
|
||||||
fixturenet-eth-lighthouse-1:
|
fixturenet-eth-lighthouse-1:
|
||||||
restart: always
|
restart: always
|
||||||
@@ -82,7 +85,7 @@ services:
|
|||||||
NODE_NUMBER: "1"
|
NODE_NUMBER: "1"
|
||||||
ETH1_ENDPOINT: "http://fixturenet-eth-geth-1:8545"
|
ETH1_ENDPOINT: "http://fixturenet-eth-geth-1:8545"
|
||||||
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-1:8551"
|
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-1:8551"
|
||||||
image: cerc/fixturenet-eth-lighthouse:local
|
image: cerc/fixturenet-plugeth-lighthouse:local
|
||||||
volumes:
|
volumes:
|
||||||
- fixturenet_plugeth_lighthouse_1_data:/opt/testnet/build/cl
|
- fixturenet_plugeth_lighthouse_1_data:/opt/testnet/build/cl
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -109,7 +112,7 @@ services:
|
|||||||
ETH1_ENDPOINT: "http://fixturenet-eth-geth-2:8545"
|
ETH1_ENDPOINT: "http://fixturenet-eth-geth-2:8545"
|
||||||
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-2:8551"
|
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-2:8551"
|
||||||
LIGHTHOUSE_GENESIS_STATE_URL: "http://fixturenet-eth-lighthouse-1:8001/eth/v2/debug/beacon/states/0"
|
LIGHTHOUSE_GENESIS_STATE_URL: "http://fixturenet-eth-lighthouse-1:8001/eth/v2/debug/beacon/states/0"
|
||||||
image: cerc/fixturenet-eth-lighthouse:local
|
image: cerc/fixturenet-plugeth-lighthouse:local
|
||||||
volumes:
|
volumes:
|
||||||
- fixturenet_plugeth_lighthouse_2_data:/opt/testnet/build/cl
|
- fixturenet_plugeth_lighthouse_2_data:/opt/testnet/build/cl
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
version: '3.2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
# Deploys the sushiswap v3 subgraph
|
|
||||||
sushiswap-subgraph-v3:
|
|
||||||
image: cerc/sushiswap-subgraphs:local
|
|
||||||
restart: on-failure
|
|
||||||
depends_on:
|
|
||||||
graph-node:
|
|
||||||
condition: service_healthy
|
|
||||||
environment:
|
|
||||||
- APP=v3
|
|
||||||
- NETWORK=lotus-fixturenet
|
|
||||||
command: ["bash", "-c", "./v3/run-v3.sh && ./blocks/run-blocks.sh"]
|
|
||||||
working_dir: /app/subgraphs
|
|
||||||
volumes:
|
|
||||||
- ../config/fixturenet-sushiswap-subgraph-v3/lotus-fixturenet.js.template:/app/config/lotus-fixturenet.js.template
|
|
||||||
- ../config/fixturenet-sushiswap-subgraph-v3/run-blocks.sh:/app/subgraphs/blocks/run-blocks.sh
|
|
||||||
- ../config/fixturenet-sushiswap-subgraph-v3/run-v3.sh:/app/subgraphs/v3/run-v3.sh
|
|
||||||
- sushiswap_core_deployment:/app/subgraphs/v3/core-deployments/docker
|
|
||||||
- sushiswap_periphery_deployment:/app/subgraphs/v3/periphery-deployments/docker
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
sushiswap_core_deployment:
|
|
||||||
sushiswap_periphery_deployment:
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
services:
|
|
||||||
graph-node:
|
|
||||||
image: cerc/graph-node:local
|
|
||||||
depends_on:
|
|
||||||
db:
|
|
||||||
condition: service_healthy
|
|
||||||
ipfs:
|
|
||||||
condition: service_healthy
|
|
||||||
extra_hosts:
|
|
||||||
- host.docker.internal:host-gateway
|
|
||||||
environment:
|
|
||||||
ipfs: ipfs:5001
|
|
||||||
postgres_host: db
|
|
||||||
postgres_port: 5432
|
|
||||||
postgres_user: graph-node
|
|
||||||
postgres_pass: password
|
|
||||||
postgres_db: graph-node
|
|
||||||
ethereum: ${ETH_NETWORKS:-lotus-fixturenet:http://lotus-node-1:1234/rpc/v1}
|
|
||||||
GRAPH_LOG: debug
|
|
||||||
ETHEREUM_REORG_THRESHOLD: 3
|
|
||||||
entrypoint: ["bash", "-c"]
|
|
||||||
# Wait for ETH RPC endpoint to be up when running with fixturenet-lotus
|
|
||||||
command: |
|
|
||||||
"wait_for ${ETH_RPC_HOST:-lotus-node-1}:${ETH_RPC_PORT:-1234} -t 1800 -- start"
|
|
||||||
ports:
|
|
||||||
- "8000"
|
|
||||||
- "8001"
|
|
||||||
- "8020"
|
|
||||||
- "8030"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-vz", "localhost", "8020"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 10
|
|
||||||
start_period: 3s
|
|
||||||
ipfs:
|
|
||||||
image: ipfs/kubo:master-2023-02-20-714a968
|
|
||||||
volumes:
|
|
||||||
- ipfs-import:/import
|
|
||||||
- ipfs-data:/data/ipfs
|
|
||||||
ports:
|
|
||||||
- "8080"
|
|
||||||
- "4001"
|
|
||||||
- "5001"
|
|
||||||
db:
|
|
||||||
image: postgres:14-alpine
|
|
||||||
volumes:
|
|
||||||
- db-data:/var/lib/postgresql/data
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: "graph-node"
|
|
||||||
POSTGRES_DB: "graph-node"
|
|
||||||
POSTGRES_PASSWORD: "password"
|
|
||||||
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
|
|
||||||
command:
|
|
||||||
[
|
|
||||||
"postgres",
|
|
||||||
"-cshared_preload_libraries=pg_stat_statements"
|
|
||||||
]
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 10
|
|
||||||
start_period: 3s
|
|
||||||
ports:
|
|
||||||
- "5432"
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
ipfs-import:
|
|
||||||
ipfs-data:
|
|
||||||
db-data:
|
|
||||||
@@ -25,8 +25,8 @@ services:
|
|||||||
PROM_HTTP: "true"
|
PROM_HTTP: "true"
|
||||||
PROM_HTTP_ADDR: "0.0.0.0"
|
PROM_HTTP_ADDR: "0.0.0.0"
|
||||||
PROM_HTTP_PORT: "8090"
|
PROM_HTTP_PORT: "8090"
|
||||||
LOG_LEVEL: "debug"
|
LOGRUS_LEVEL: "debug"
|
||||||
CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true}
|
CERC_REMOTE_DEBUG: "true"
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: ../config/ipld-eth-server/chain.json
|
source: ../config/ipld-eth-server/chain.json
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
version: "3.2"
|
|
||||||
|
|
||||||
services:
|
|
||||||
lasso:
|
|
||||||
image: cerc/lasso:local
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- "0.0.0.0:3000:3000"
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
|
||||||
redis:
|
|
||||||
hostname: mainnet-eth-api-proxy-redis
|
|
||||||
image: redis:7-alpine
|
|
||||||
command: redis-server --save "" --appendonly no --maxmemory-policy allkeys-lru --maxmemory 1G
|
|
||||||
|
|
||||||
eth-api-proxy:
|
|
||||||
hostname: mainnet-eth-api-proxy
|
|
||||||
image: cerc/eth-api-proxy:local
|
|
||||||
env_file:
|
|
||||||
- ../config/mainnet-eth-api-proxy/ethpxy.env
|
|
||||||
ports:
|
|
||||||
- 8547
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
|
||||||
keycloak-db:
|
|
||||||
image: postgres:14-alpine
|
|
||||||
env_file:
|
|
||||||
- ../config/mainnet-eth-keycloak/keycloak.env
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 10
|
|
||||||
start_period: 3s
|
|
||||||
volumes:
|
|
||||||
- mainnet_eth_keycloak_db:/var/lib/postgresql/data
|
|
||||||
ports:
|
|
||||||
- 5432
|
|
||||||
|
|
||||||
keycloak:
|
|
||||||
image: cerc/keycloak:local
|
|
||||||
env_file:
|
|
||||||
- ../config/mainnet-eth-keycloak/keycloak.env
|
|
||||||
environment:
|
|
||||||
JAVA_OPTS_APPEND: "-Dkeycloak.migration.action=import -Dkeycloak.migration.provider=dir -Dkeycloak.migration.dir=/import -Dkeycloak.migration.strategy=IGNORE_EXISTING"
|
|
||||||
volumes:
|
|
||||||
- ../config/mainnet-eth-keycloak/import:/import
|
|
||||||
ports:
|
|
||||||
- 8080
|
|
||||||
command: ["start"]
|
|
||||||
depends_on:
|
|
||||||
keycloak-db:
|
|
||||||
condition: service_healthy
|
|
||||||
|
|
||||||
keycloak-reg-ui:
|
|
||||||
image: cerc/keycloak-reg-ui:local
|
|
||||||
env_file:
|
|
||||||
- ../config/mainnet-eth-keycloak/keycloak.env
|
|
||||||
volumes:
|
|
||||||
- ../config/mainnet-eth-keycloak/ui:/config
|
|
||||||
ports:
|
|
||||||
- 80
|
|
||||||
|
|
||||||
keycloak-reg-api:
|
|
||||||
image: cerc/keycloak-reg-api:local
|
|
||||||
env_file:
|
|
||||||
- ../config/mainnet-eth-keycloak/keycloak.env
|
|
||||||
ports:
|
|
||||||
- 9292
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
mainnet_eth_keycloak_db:
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
version: "3.2"
|
|
||||||
services:
|
|
||||||
prometheus:
|
|
||||||
restart: always
|
|
||||||
image: prom/prometheus
|
|
||||||
depends_on:
|
|
||||||
mainnet-eth-geth-1:
|
|
||||||
condition: service_healthy
|
|
||||||
env_file:
|
|
||||||
- ../config/mainnet-eth-metrics/metrics.env
|
|
||||||
volumes:
|
|
||||||
- ../config/mainnet-eth-metrics/prometheus/etc:/etc/prometheus
|
|
||||||
ports:
|
|
||||||
- "9090"
|
|
||||||
grafana:
|
|
||||||
restart: always
|
|
||||||
image: grafana/grafana
|
|
||||||
env_file:
|
|
||||||
- ../config/mainnet-eth-metrics/metrics.env
|
|
||||||
volumes:
|
|
||||||
- ../config/mainnet-eth-metrics/grafana/etc/provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
|
||||||
- ../config/mainnet-eth-metrics/grafana/etc/provisioning/datasources:/etc/grafana/provisioning/datasources
|
|
||||||
- ../config/mainnet-eth-metrics/grafana/etc/dashboards:/etc/grafana/dashboards
|
|
||||||
ports:
|
|
||||||
- "3000"
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
|
|
||||||
services:
|
|
||||||
|
|
||||||
mainnet-eth-geth-1:
|
|
||||||
restart: always
|
|
||||||
hostname: mainnet-eth-geth-1
|
|
||||||
cap_add:
|
|
||||||
- SYS_PTRACE
|
|
||||||
image: cerc/go-ethereum:local
|
|
||||||
entrypoint: /bin/sh
|
|
||||||
command: -c "/opt/run-geth.sh"
|
|
||||||
env_file:
|
|
||||||
- ../config/mainnet-eth/geth.env
|
|
||||||
volumes:
|
|
||||||
- mainnet_eth_geth_1_data:/data
|
|
||||||
- mainnet_eth_config_data:/etc/mainnet-eth
|
|
||||||
- ../config/mainnet-eth/scripts/run-geth.sh:/opt/run-geth.sh
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-v", "localhost", "8545"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 10
|
|
||||||
start_period: 3s
|
|
||||||
ports:
|
|
||||||
# http api
|
|
||||||
- "8545"
|
|
||||||
# ws api
|
|
||||||
- "8546"
|
|
||||||
# ws el
|
|
||||||
- "8551"
|
|
||||||
# p2p
|
|
||||||
- "30303"
|
|
||||||
- "30303/udp"
|
|
||||||
# debugging
|
|
||||||
- "40000"
|
|
||||||
# metrics
|
|
||||||
- "6060"
|
|
||||||
|
|
||||||
mainnet-eth-lighthouse-1:
|
|
||||||
restart: always
|
|
||||||
hostname: mainnet-eth-lighthouse-1
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:5052/eth/v2/beacon/blocks/head"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 10
|
|
||||||
start_period: 30s
|
|
||||||
environment:
|
|
||||||
LIGHTHOUSE_EXECUTION_ENDPOINT: "http://mainnet-eth-geth-1:8551"
|
|
||||||
env_file:
|
|
||||||
- ../config/mainnet-eth/lighthouse.env
|
|
||||||
image: cerc/lighthouse:local
|
|
||||||
entrypoint: /bin/sh
|
|
||||||
command: -c "/opt/run-lighthouse.sh"
|
|
||||||
volumes:
|
|
||||||
- mainnet_eth_lighthouse_1_data:/data
|
|
||||||
- mainnet_eth_config_data:/etc/mainnet-eth
|
|
||||||
- ../config/mainnet-eth/scripts/run-lighthouse.sh:/opt/run-lighthouse.sh
|
|
||||||
ports:
|
|
||||||
# api
|
|
||||||
- "5052"
|
|
||||||
# metrics
|
|
||||||
- "5054"
|
|
||||||
# p2p
|
|
||||||
- "9000"
|
|
||||||
- "9000/udp"
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
mainnet_eth_config_data:
|
|
||||||
mainnet_eth_geth_1_data:
|
|
||||||
mainnet_eth_lighthouse_1_data:
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
version: "3.8"
|
|
||||||
|
|
||||||
services:
|
|
||||||
go-opera:
|
|
||||||
restart: unless-stopped
|
|
||||||
image: cerc/go-opera:local
|
|
||||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/start-node.sh"]
|
|
||||||
volumes:
|
|
||||||
- ../config/mainnet-go-opera/start-node.sh:/docker-entrypoint-scripts.d/start-node.sh
|
|
||||||
# TODO: ports taken from dockerfile, determine which are needed
|
|
||||||
ports:
|
|
||||||
- "5050:5050" # p2p port, needed
|
|
||||||
- "5050:5050/udp"
|
|
||||||
- "18545:18545" # http rpc port
|
|
||||||
- "18546:18546" # websockets rpc port
|
|
||||||
#- "18547" # unknown
|
|
||||||
#- "19090" # unknown
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
services:
|
|
||||||
laconicd:
|
|
||||||
restart: no
|
|
||||||
image: cerc/laconicd:local
|
|
||||||
command: ["/bin/sh", "-c", "/opt/run-laconicd.sh"]
|
|
||||||
volumes:
|
|
||||||
# The cosmos-sdk node's database directory:
|
|
||||||
- laconicd-data:/root/.laconicd/data
|
|
||||||
- laconicd-config:/root/.laconicd/config
|
|
||||||
- laconicd-keyring:/root/.laconicd/keyring-test
|
|
||||||
# TODO: look at folding these scripts into the container
|
|
||||||
- ../config/mainnet-laconicd/scripts/run-laconicd.sh:/opt/run-laconicd.sh
|
|
||||||
- ../config/mainnet-laconicd/scripts/export-mykey.sh:/docker-entrypoint-scripts.d/export-mykey.sh
|
|
||||||
- ../config/mainnet-laconicd/scripts/export-myaddress.sh:/docker-entrypoint-scripts.d/export-myaddress.sh
|
|
||||||
# TODO: determine which of the ports below is really needed
|
|
||||||
ports:
|
|
||||||
- "6060"
|
|
||||||
- "26657"
|
|
||||||
- "26656"
|
|
||||||
- "9473"
|
|
||||||
- "8545"
|
|
||||||
- "8546"
|
|
||||||
- "9090"
|
|
||||||
- "9091"
|
|
||||||
- "1317"
|
|
||||||
cli:
|
|
||||||
image: cerc/laconic-registry-cli:local
|
|
||||||
volumes:
|
|
||||||
- ../config/mainnet-laconicd/registry-cli-config-template.yml:/registry-cli-config-template.yml
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
laconicd-data:
|
|
||||||
laconicd-config:
|
|
||||||
laconicd-keyring:
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
version: '3.2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
# Builds and serves the MobyMask v3 react-app
|
|
||||||
mobymask-v3-app:
|
|
||||||
restart: unless-stopped
|
|
||||||
image: cerc/mobymask-ui:local
|
|
||||||
env_file:
|
|
||||||
- ../config/watcher-mobymask-v3/mobymask-params.env
|
|
||||||
environment:
|
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
|
||||||
CERC_CHAIN_ID: ${CERC_CHAIN_ID}
|
|
||||||
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
|
||||||
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
|
|
||||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
|
||||||
CERC_PUBSUB: ${CERC_PUBSUB}
|
|
||||||
CERC_GOSSIPSUB_DIRECT_PEERS: ${CERC_GOSSIPSUB_DIRECT_PEERS}
|
|
||||||
CERC_RELEASE: "laconic-v3"
|
|
||||||
CERC_NA_ADDRESS: ${CERC_NA_ADDRESS}
|
|
||||||
CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS}
|
|
||||||
CERC_CA_ADDRESS: ${CERC_CA_ADDRESS}
|
|
||||||
CERC_APP_WATCHER_URL: ${CERC_APP_WATCHER_URL}
|
|
||||||
CERC_PAYMENT_NITRO_ADDRESS: ${CERC_PAYMENT_NITRO_ADDRESS}
|
|
||||||
CERC_SNAP_URL: ${CERC_SNAP_URL}
|
|
||||||
working_dir: /scripts
|
|
||||||
command: ["sh", "mobymask-app-start.sh"]
|
|
||||||
volumes:
|
|
||||||
- ../config/watcher-mobymask-v3/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
|
||||||
- ../config/watcher-mobymask-v2/mobymask-app-config.json:/app/src/mobymask-app-config.json
|
|
||||||
ports:
|
|
||||||
- "127.0.0.1:3004:80"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-vz", "localhost", "80"]
|
|
||||||
interval: 20s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 15
|
|
||||||
start_period: 10s
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
@@ -14,19 +14,16 @@ services:
|
|||||||
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_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||||
CERC_PUBSUB: ${CERC_PUBSUB}
|
CERC_BUILD_DIR: "@cerc-io/mobymask-ui/build"
|
||||||
CERC_RELEASE: "v0.1.7"
|
|
||||||
CERC_USE_NPM: true
|
|
||||||
CERC_CONFIG_FILE: "src/config.json"
|
|
||||||
working_dir: /scripts
|
working_dir: /scripts
|
||||||
command: ["sh", "mobymask-app-start.sh"]
|
command: ["sh", "mobymask-app-start.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
|
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||||
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
||||||
- ../config/watcher-mobymask-v2/mobymask-app-config.json:/app/src/mobymask-app-config.json
|
|
||||||
- peers_ids:/peers
|
- peers_ids:/peers
|
||||||
- mobymask_deployment:/server
|
- mobymask_deployment:/server
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:3002:80"
|
- "0.0.0.0:3002:80"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "nc", "-vz", "localhost", "80"]
|
test: ["CMD", "nc", "-vz", "localhost", "80"]
|
||||||
interval: 20s
|
interval: 20s
|
||||||
@@ -49,19 +46,16 @@ services:
|
|||||||
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_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||||
CERC_PUBSUB: ${CERC_PUBSUB}
|
CERC_BUILD_DIR: "@cerc-io/mobymask-ui-lxdao/build"
|
||||||
CERC_RELEASE: "v0.1.7-lxdao-0.1.1"
|
|
||||||
CERC_USE_NPM: false
|
|
||||||
CERC_CONFIG_FILE: "src/utils/config.json"
|
|
||||||
working_dir: /scripts
|
working_dir: /scripts
|
||||||
command: ["sh", "mobymask-app-start.sh"]
|
command: ["sh", "mobymask-app-start.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
|
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||||
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/scripts/mobymask-app-start.sh
|
||||||
- ../config/watcher-mobymask-v2/mobymask-app-config.json:/app/src/mobymask-app-config.json
|
|
||||||
- peers_ids:/peers
|
- peers_ids:/peers
|
||||||
- mobymask_deployment:/server
|
- mobymask_deployment:/server
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:3004:80"
|
- "0.0.0.0:3004:80"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "nc", "-vz", "localhost", "80"]
|
test: ["CMD", "nc", "-vz", "localhost", "80"]
|
||||||
interval: 20s
|
interval: 20s
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
version: '3.2'
|
version: '3.2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# Builds and serves the peer-test react-app
|
|
||||||
peer-test-app:
|
peer-test-app:
|
||||||
restart: unless-stopped
|
# Builds and serves the peer-test react-app
|
||||||
image: cerc/react-peer:local
|
image: cerc/react-peer:local
|
||||||
working_dir: /scripts
|
working_dir: /scripts
|
||||||
env_file:
|
env_file:
|
||||||
@@ -14,11 +13,11 @@ services:
|
|||||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||||
command: ["sh", "test-app-start.sh"]
|
command: ["sh", "test-app-start.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/network/wait-for-it.sh:/scripts/wait-for-it.sh
|
- ../config/wait-for-it.sh:/scripts/wait-for-it.sh
|
||||||
- ../config/watcher-mobymask-v2/test-app-start.sh:/scripts/test-app-start.sh
|
- ../config/watcher-mobymask-v2/test-app-start.sh:/scripts/test-app-start.sh
|
||||||
- peers_ids:/peers
|
- peers_ids:/peers
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:3003:80"
|
- "0.0.0.0:3003:80"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "nc", "-v", "localhost", "80"]
|
test: ["CMD", "nc", "-v", "localhost", "80"]
|
||||||
interval: 20s
|
interval: 20s
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
version: "3.8"
|
|
||||||
|
|
||||||
services:
|
|
||||||
reth:
|
|
||||||
restart: unless-stopped
|
|
||||||
hostname: reth
|
|
||||||
image: cerc/reth:local
|
|
||||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/start-reth.sh"]
|
|
||||||
volumes:
|
|
||||||
- ../config/reth/start-reth.sh:/docker-entrypoint-scripts.d/start-reth.sh
|
|
||||||
- reth_data:/root/.local/share/reth
|
|
||||||
- shared_data:/root/.shared_data
|
|
||||||
ports:
|
|
||||||
- "8545:8545" # http rpc
|
|
||||||
- "8546:8546" # ws rpc
|
|
||||||
- "30303:30303" # network listening port
|
|
||||||
- "30303:30303/udp"
|
|
||||||
- "8551" # consensus auth
|
|
||||||
|
|
||||||
lighthouse:
|
|
||||||
restart: unless-stopped
|
|
||||||
hostname: lighthouse
|
|
||||||
image: cerc/lighthouse:local
|
|
||||||
entrypoint: ["sh", "/docker-entrypoint-scripts.d/start-lighthouse.sh"]
|
|
||||||
volumes:
|
|
||||||
- ../config/reth/start-lighthouse.sh:/docker-entrypoint-scripts.d/start-lighthouse.sh
|
|
||||||
- lighthouse_data:/root/.lighthouse/mainnet
|
|
||||||
- shared_data:/root/.shared_data
|
|
||||||
ports:
|
|
||||||
- "8001"
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
reth_data:
|
|
||||||
lighthouse_data:
|
|
||||||
shared_data:
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
version: '3.2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
# Deploys the sushiswap v3 subgraph
|
|
||||||
sushiswap-subgraph-v3:
|
|
||||||
image: cerc/sushiswap-subgraphs:local
|
|
||||||
restart: on-failure
|
|
||||||
depends_on:
|
|
||||||
graph-node:
|
|
||||||
condition: service_healthy
|
|
||||||
environment:
|
|
||||||
- APP=v3
|
|
||||||
- NETWORK=filecoin
|
|
||||||
command: ["bash", "-c", "./blocks/run-blocks.sh && ./v3/run-v3.sh"]
|
|
||||||
working_dir: /app/subgraphs
|
|
||||||
volumes:
|
|
||||||
- ../config/sushiswap-subgraph-v3/filecoin.js:/app/config/filecoin.js
|
|
||||||
- ../config/sushiswap-subgraph-v3/run-blocks.sh:/app/subgraphs/blocks/run-blocks.sh
|
|
||||||
- ../config/sushiswap-subgraph-v3/run-v3.sh:/app/subgraphs/v3/run-v3.sh
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
@@ -5,7 +5,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||||
volumes:
|
volumes:
|
||||||
- test-data:/data
|
- test-data:/var
|
||||||
ports:
|
ports:
|
||||||
- "80"
|
- "80"
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ services:
|
|||||||
- ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh
|
- ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh
|
||||||
- mobymask_watcher_db_data:/var/lib/postgresql/data
|
- mobymask_watcher_db_data:/var/lib/postgresql/data
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:15432:5432"
|
- "0.0.0.0:15432:5432"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
||||||
interval: 20s
|
interval: 20s
|
||||||
@@ -44,7 +44,7 @@ services:
|
|||||||
CERC_L2_NODE_PORT: ${CERC_L2_NODE_PORT}
|
CERC_L2_NODE_PORT: ${CERC_L2_NODE_PORT}
|
||||||
command: ["sh", "deploy-and-generate-invite.sh"]
|
command: ["sh", "deploy-and-generate-invite.sh"]
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/network/wait-for-it.sh:/app/packages/server/wait-for-it.sh
|
- ../config/wait-for-it.sh:/app/packages/server/wait-for-it.sh
|
||||||
- ../config/watcher-mobymask-v2/secrets-template.json:/app/packages/server/secrets-template.json
|
- ../config/watcher-mobymask-v2/secrets-template.json:/app/packages/server/secrets-template.json
|
||||||
- ../config/watcher-mobymask-v2/deploy-and-generate-invite.sh:/app/packages/server/deploy-and-generate-invite.sh
|
- ../config/watcher-mobymask-v2/deploy-and-generate-invite.sh:/app/packages/server/deploy-and-generate-invite.sh
|
||||||
- mobymask_deployment:/app/packages/server
|
- mobymask_deployment:/app/packages/server
|
||||||
@@ -84,7 +84,6 @@ services:
|
|||||||
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_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
||||||
CERC_PUBSUB: ${CERC_PUBSUB}
|
|
||||||
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}
|
||||||
@@ -96,9 +95,9 @@ services:
|
|||||||
- mobymask_deployment:/server
|
- mobymask_deployment:/server
|
||||||
# Expose GQL, metrics and relay node ports
|
# Expose GQL, metrics and relay node ports
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:3001:3001"
|
- "0.0.0.0:3001:3001"
|
||||||
- "127.0.0.1:9001:9001"
|
- "0.0.0.0:9001:9001"
|
||||||
- "127.0.0.1:9090:9090"
|
- "0.0.0.0:9090:9090"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "busybox", "nc", "localhost", "9090"]
|
test: ["CMD", "busybox", "nc", "localhost", "9090"]
|
||||||
interval: 20s
|
interval: 20s
|
||||||
|
|||||||
@@ -1,128 +0,0 @@
|
|||||||
version: '3.2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
# Starts the PostgreSQL database for watcher
|
|
||||||
mobymask-watcher-db:
|
|
||||||
restart: unless-stopped
|
|
||||||
image: postgres:14-alpine
|
|
||||||
environment:
|
|
||||||
- POSTGRES_USER=vdbm
|
|
||||||
- POSTGRES_MULTIPLE_DATABASES=mobymask-watcher,mobymask-watcher-job-queue
|
|
||||||
- POSTGRES_EXTENSION=mobymask-watcher-job-queue:pgcrypto
|
|
||||||
- POSTGRES_PASSWORD=password
|
|
||||||
volumes:
|
|
||||||
- ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh
|
|
||||||
- mobymask_watcher_db_data:/var/lib/postgresql/data
|
|
||||||
ports:
|
|
||||||
- "127.0.0.1:15432:5432"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
|
||||||
interval: 20s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 15
|
|
||||||
start_period: 10s
|
|
||||||
|
|
||||||
# Deploys the MobyMask contract and generates an invite link
|
|
||||||
# Deployment is skipped if CERC_DEPLOYED_CONTRACT env is set
|
|
||||||
mobymask:
|
|
||||||
image: cerc/mobymask:local
|
|
||||||
working_dir: /app/packages/server
|
|
||||||
env_file:
|
|
||||||
- ../config/watcher-mobymask-v3/mobymask-params.env
|
|
||||||
environment:
|
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
|
||||||
ENV: "PROD"
|
|
||||||
CERC_L2_GETH_RPC: ${CERC_L2_GETH_RPC}
|
|
||||||
CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL}
|
|
||||||
CERC_PRIVATE_KEY_DEPLOYER: ${CERC_PRIVATE_KEY_DEPLOYER}
|
|
||||||
CERC_MOBYMASK_APP_BASE_URI: ${CERC_MOBYMASK_APP_BASE_URI}
|
|
||||||
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
|
||||||
CERC_L2_GETH_HOST: ${CERC_L2_GETH_HOST}
|
|
||||||
CERC_L2_GETH_PORT: ${CERC_L2_GETH_PORT}
|
|
||||||
CERC_L2_NODE_HOST: ${CERC_L2_NODE_HOST}
|
|
||||||
CERC_L2_NODE_PORT: ${CERC_L2_NODE_PORT}
|
|
||||||
command: ["sh", "deploy-and-generate-invite.sh"]
|
|
||||||
volumes:
|
|
||||||
- ../config/network/wait-for-it.sh:/app/packages/server/wait-for-it.sh
|
|
||||||
- ../config/watcher-mobymask-v2/secrets-template.json:/app/packages/server/secrets-template.json
|
|
||||||
- ../config/watcher-mobymask-v2/deploy-and-generate-invite.sh:/app/packages/server/deploy-and-generate-invite.sh
|
|
||||||
- mobymask_deployment:/app/packages/server
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
|
|
||||||
# Creates peer-id files if they don't exist
|
|
||||||
peer-ids-gen:
|
|
||||||
image: cerc/watcher-ts:local
|
|
||||||
restart: on-failure
|
|
||||||
environment:
|
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
|
||||||
working_dir: /app/packages/peer
|
|
||||||
command: ["sh", "generate-peer-ids.sh"]
|
|
||||||
volumes:
|
|
||||||
- ../config/watcher-mobymask-v2/generate-peer-ids.sh:/app/packages/peer/generate-peer-ids.sh
|
|
||||||
- peers_ids:/peer-ids
|
|
||||||
|
|
||||||
# Optionally deploys the Nitro contracts; sets them at the required path
|
|
||||||
# Starts the MobyMask v3 watcher server
|
|
||||||
mobymask-watcher-server:
|
|
||||||
image: cerc/watcher-mobymask-v3:local
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
mobymask-watcher-db:
|
|
||||||
condition: service_healthy
|
|
||||||
peer-ids-gen:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
mobymask:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
env_file:
|
|
||||||
- ../config/watcher-mobymask-v3/mobymask-params.env
|
|
||||||
environment:
|
|
||||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
|
||||||
CERC_L2_GETH_RPC: ${CERC_L2_GETH_RPC}
|
|
||||||
CERC_L1_ACCOUNTS_CSV_URL: ${CERC_L1_ACCOUNTS_CSV_URL}
|
|
||||||
CERC_PRIVATE_KEY_DEPLOYER: ${CERC_PRIVATE_KEY_DEPLOYER}
|
|
||||||
CERC_RELAY_PEERS: ${CERC_RELAY_PEERS}
|
|
||||||
CERC_DENY_MULTIADDRS: ${CERC_DENY_MULTIADDRS}
|
|
||||||
CERC_PUBSUB: ${CERC_PUBSUB}
|
|
||||||
CERC_RELAY_ANNOUNCE_DOMAIN: ${CERC_RELAY_ANNOUNCE_DOMAIN}
|
|
||||||
CERC_ENABLE_PEER_L2_TXS: ${CERC_ENABLE_PEER_L2_TXS}
|
|
||||||
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
|
|
||||||
CERC_NA_ADDRESS: ${CERC_NA_ADDRESS}
|
|
||||||
CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS}
|
|
||||||
CERC_CA_ADDRESS: ${CERC_CA_ADDRESS}
|
|
||||||
CERC_PRIVATE_KEY_PEER: ${CERC_PRIVATE_KEY_PEER}
|
|
||||||
CERC_PRIVATE_KEY_NITRO: ${CERC_PRIVATE_KEY_NITRO}
|
|
||||||
CERC_PEER_ID: ${CERC_PEER_ID}
|
|
||||||
entrypoint: ["bash", "-c"]
|
|
||||||
command: ["./deploy-nitro-contracts.sh && ./start-server.sh"]
|
|
||||||
volumes:
|
|
||||||
- ../config/watcher-mobymask-v3/deploy-nitro-contracts.sh:/app/deploy-nitro-contracts.sh
|
|
||||||
- ../config/watcher-mobymask-v3/deploy-nitro-contracts.ts:/app/deploy-nitro-contracts.ts
|
|
||||||
- ../config/watcher-mobymask-v3/watcher-config-template.toml:/app/environments/watcher-config-template.toml
|
|
||||||
- ../config/watcher-mobymask-v3/watcher-config-rates.toml:/app/environments/rates.toml
|
|
||||||
- ../config/watcher-mobymask-v3/keys:/app/keys
|
|
||||||
- ../config/watcher-mobymask-v3/start-server.sh:/app/start-server.sh
|
|
||||||
- nitro_data:/app/out/nitro-db
|
|
||||||
- peers_ids:/app/peers
|
|
||||||
- nitro_addresses:/nitro
|
|
||||||
- mobymask_deployment:/server
|
|
||||||
# Expose GQL, metrics and relay node ports
|
|
||||||
ports:
|
|
||||||
- "127.0.0.1:3001:3001"
|
|
||||||
- "127.0.0.1:9001:9001"
|
|
||||||
- "127.0.0.1:9090:9090"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "busybox", "nc", "localhost", "9090"]
|
|
||||||
interval: 20s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 15
|
|
||||||
start_period: 5s
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
mobymask_watcher_db_data:
|
|
||||||
peers_ids:
|
|
||||||
mobymask_deployment:
|
|
||||||
nitro_addresses:
|
|
||||||
nitro_data:
|
|
||||||
@@ -24,37 +24,15 @@ services:
|
|||||||
retries: 15
|
retries: 15
|
||||||
start_period: 10s
|
start_period: 10s
|
||||||
|
|
||||||
mobymask-watcher-job-runner:
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
mobymask-watcher-db:
|
|
||||||
condition: service_healthy
|
|
||||||
image: cerc/watcher-mobymask:local
|
|
||||||
command: ["sh", "-c", "yarn job-runner"]
|
|
||||||
volumes:
|
|
||||||
- ../config/watcher-mobymask/mobymask-watcher.toml:/app/environments/local.toml
|
|
||||||
ports:
|
|
||||||
- "0.0.0.0:9000:9000"
|
|
||||||
extra_hosts:
|
|
||||||
- "ipld-eth-server:host-gateway"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-v", "localhost", "9000"]
|
|
||||||
interval: 20s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 15
|
|
||||||
start_period: 5s
|
|
||||||
|
|
||||||
mobymask-watcher-server:
|
mobymask-watcher-server:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
mobymask-watcher-db:
|
mobymask-watcher-db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
mobymask-watcher-job-runner:
|
|
||||||
condition: service_healthy
|
|
||||||
image: cerc/watcher-mobymask:local
|
image: cerc/watcher-mobymask:local
|
||||||
command: ["sh", "-c", "yarn server"]
|
command: ["sh", "-c", "yarn server"]
|
||||||
volumes:
|
volumes:
|
||||||
- ../config/watcher-mobymask/mobymask-watcher.toml:/app/environments/local.toml
|
- ../config/watcher-mobymask/mobymask-watcher.toml:/app/packages/mobymask-watcher/environments/local.toml
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:3001:3001"
|
- "0.0.0.0:3001:3001"
|
||||||
- "0.0.0.0:9001:9001"
|
- "0.0.0.0:9001:9001"
|
||||||
@@ -67,5 +45,21 @@ services:
|
|||||||
retries: 15
|
retries: 15
|
||||||
start_period: 5s
|
start_period: 5s
|
||||||
|
|
||||||
|
mobymask-watcher-job-runner:
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
mobymask-watcher-server:
|
||||||
|
condition: service_healthy
|
||||||
|
mobymask-watcher-db:
|
||||||
|
condition: service_healthy
|
||||||
|
image: cerc/watcher-mobymask:local
|
||||||
|
command: ["sh", "-c", "yarn job-runner"]
|
||||||
|
volumes:
|
||||||
|
- ../config/watcher-mobymask/mobymask-watcher.toml:/app/packages/mobymask-watcher/environments/local.toml
|
||||||
|
ports:
|
||||||
|
- "0.0.0.0:9000:9000"
|
||||||
|
extra_hosts:
|
||||||
|
- "ipld-eth-server:host-gateway"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mobymask_watcher_db_data:
|
mobymask_watcher_db_data:
|
||||||
|
|||||||
@@ -1,187 +0,0 @@
|
|||||||
version: '3.2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
sushiswap-watcher-db:
|
|
||||||
restart: unless-stopped
|
|
||||||
image: postgres:14-alpine
|
|
||||||
environment:
|
|
||||||
- POSTGRES_USER=vdbm
|
|
||||||
- POSTGRES_MULTIPLE_DATABASES=erc20-watcher,sushi-watcher,sushi-info-watcher,erc20-watcher-job-queue,sushi-watcher-job-queue,sushi-info-watcher-job-queue
|
|
||||||
- POSTGRES_EXTENSION=erc20-watcher-job-queue:pgcrypto,sushi-watcher-job-queue:pgcrypto,sushi-info-watcher-job-queue:pgcrypto
|
|
||||||
- POSTGRES_PASSWORD=password
|
|
||||||
command: ["postgres", "-c", "shared_preload_libraries=pg_stat_statements", "-c", "pg_stat_statements.track=all", "-c", "work_mem=2GB"]
|
|
||||||
volumes:
|
|
||||||
- ../config/postgresql/multiple-postgressql-databases.sh:/docker-entrypoint-initdb.d/multiple-postgressql-databases.sh
|
|
||||||
- ../config/postgresql/create-pg-stat-statements.sql:/docker-entrypoint-initdb.d/create-pg-stat-statements.sql
|
|
||||||
- sushiswap_watcher_db_data:/var/lib/postgresql/data
|
|
||||||
ports:
|
|
||||||
- "0.0.0.0:15435:5432"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-v", "localhost", "5432"]
|
|
||||||
interval: 20s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 15
|
|
||||||
start_period: 10s
|
|
||||||
shm_size: '8GB'
|
|
||||||
|
|
||||||
erc20-watcher-server:
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
sushiswap-watcher-db:
|
|
||||||
condition: service_healthy
|
|
||||||
image: cerc/watcher-sushiswap:local
|
|
||||||
working_dir: /app/packages/erc20-watcher
|
|
||||||
environment:
|
|
||||||
- DEBUG=vulcanize:*
|
|
||||||
command: ["node", "--enable-source-maps", "dist/server.js"]
|
|
||||||
volumes:
|
|
||||||
- ../config/watcher-sushiswap/erc20-watcher.toml:/app/packages/erc20-watcher/environments/local.toml
|
|
||||||
ports:
|
|
||||||
- "0.0.0.0:3005:3001"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-v", "localhost", "3001"]
|
|
||||||
interval: 20s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 15
|
|
||||||
start_period: 5s
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
|
|
||||||
sushi-watcher-job-runner:
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
sushiswap-watcher-db:
|
|
||||||
condition: service_healthy
|
|
||||||
lotus-node-1:
|
|
||||||
condition: service_healthy
|
|
||||||
image: cerc/watcher-sushiswap:local
|
|
||||||
working_dir: /app/packages/uni-watcher
|
|
||||||
environment:
|
|
||||||
- DEBUG=vulcanize:*
|
|
||||||
command: ["node", "--enable-source-maps", "dist/job-runner.js"]
|
|
||||||
volumes:
|
|
||||||
- ../config/watcher-sushiswap/sushi-watcher.toml:/app/packages/uni-watcher/environments/local.toml
|
|
||||||
- ../config/watcher-sushiswap/sushi-watcher-test.toml:/app/packages/uni-watcher/environments/test.toml
|
|
||||||
ports:
|
|
||||||
- "0.0.0.0:9004:9000"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-v", "localhost", "9000"]
|
|
||||||
interval: 20s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 15
|
|
||||||
start_period: 5s
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
|
|
||||||
sushi-watcher-server:
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
sushiswap-watcher-db:
|
|
||||||
condition: service_healthy
|
|
||||||
sushi-watcher-job-runner:
|
|
||||||
condition: service_healthy
|
|
||||||
image: cerc/watcher-sushiswap:local
|
|
||||||
env_file:
|
|
||||||
- ../config/watcher-sushiswap/lotus-params.env
|
|
||||||
environment:
|
|
||||||
- DEBUG=vulcanize:*
|
|
||||||
working_dir: /app/packages/uni-watcher
|
|
||||||
command: ["node", "--enable-source-maps", "dist/server.js"]
|
|
||||||
volumes:
|
|
||||||
- ../config/watcher-sushiswap/sushi-watcher.toml:/app/packages/uni-watcher/environments/local.toml
|
|
||||||
- ../config/watcher-sushiswap/sushi-watcher-test.toml:/app/packages/uni-watcher/environments/test.toml
|
|
||||||
ports:
|
|
||||||
- "0.0.0.0:3003:3003"
|
|
||||||
- "0.0.0.0:9005:9001"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-v", "localhost", "3003"]
|
|
||||||
interval: 20s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 15
|
|
||||||
start_period: 5s
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
|
|
||||||
sushi-info-watcher-job-runner:
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
sushiswap-watcher-db:
|
|
||||||
condition: service_healthy
|
|
||||||
erc20-watcher-server:
|
|
||||||
condition: service_healthy
|
|
||||||
lotus-node-1:
|
|
||||||
condition: service_healthy
|
|
||||||
sushi-watcher-server:
|
|
||||||
condition: service_healthy
|
|
||||||
image: cerc/watcher-sushiswap:local
|
|
||||||
working_dir: /app/packages/uni-info-watcher
|
|
||||||
environment:
|
|
||||||
- DEBUG=vulcanize:*
|
|
||||||
command: ["node", "--enable-source-maps", "dist/job-runner.js"]
|
|
||||||
volumes:
|
|
||||||
- ../config/watcher-sushiswap/sushi-info-watcher.toml:/app/packages/uni-info-watcher/environments/local.toml
|
|
||||||
- ../config/watcher-sushiswap/sushi-info-watcher-test.toml:/app/packages/uni-info-watcher/environments/test.toml
|
|
||||||
ports:
|
|
||||||
- "0.0.0.0:9006:9002"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-v", "localhost", "9002"]
|
|
||||||
interval: 20s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 15
|
|
||||||
start_period: 5s
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
|
|
||||||
sushi-info-watcher-server:
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
sushiswap-watcher-db:
|
|
||||||
condition: service_healthy
|
|
||||||
erc20-watcher-server:
|
|
||||||
condition: service_healthy
|
|
||||||
sushi-watcher-server:
|
|
||||||
condition: service_healthy
|
|
||||||
sushi-info-watcher-job-runner:
|
|
||||||
condition: service_healthy
|
|
||||||
image: cerc/watcher-sushiswap:local
|
|
||||||
env_file:
|
|
||||||
- ../config/watcher-sushiswap/lotus-params.env
|
|
||||||
working_dir: /app/packages/uni-info-watcher
|
|
||||||
command: ["node", "--enable-source-maps", "dist/server.js"]
|
|
||||||
volumes:
|
|
||||||
- ../config/watcher-sushiswap/sushi-info-watcher.toml:/app/packages/uni-info-watcher/environments/local.toml
|
|
||||||
- ../config/watcher-sushiswap/sushi-info-watcher-test.toml:/app/packages/uni-info-watcher/environments/test.toml
|
|
||||||
ports:
|
|
||||||
- "0.0.0.0:3004:3004"
|
|
||||||
- "0.0.0.0:9007:9003"
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "nc", "-v", "localhost", "3004"]
|
|
||||||
interval: 20s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 15
|
|
||||||
start_period: 5s
|
|
||||||
extra_hosts:
|
|
||||||
- "host.docker.internal:host-gateway"
|
|
||||||
|
|
||||||
sushiswap-v3-info:
|
|
||||||
depends_on:
|
|
||||||
sushi-info-watcher-server:
|
|
||||||
condition: service_healthy
|
|
||||||
image: cerc/uniswap-v3-info:local
|
|
||||||
ports:
|
|
||||||
- "0.0.0.0:3006:3000"
|
|
||||||
|
|
||||||
# Deploys the core (UniswapV3Factory) contract
|
|
||||||
sushiswap-v3-core:
|
|
||||||
image: cerc/sushiswap-v3-core:local
|
|
||||||
env_file:
|
|
||||||
- ../config/watcher-sushiswap/lotus-params.env
|
|
||||||
|
|
||||||
# Deploys the periphery (NFPM, token, etc.) contracts
|
|
||||||
sushiswap-v3-periphery:
|
|
||||||
image: cerc/sushiswap-v3-periphery:local
|
|
||||||
env_file:
|
|
||||||
- ../config/watcher-sushiswap/lotus-params.env
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
sushiswap_watcher_db_data:
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Chain config
|
|
||||||
export ETH_RPC_ENDPOINT="${CERC_ETH_RPC_ENDPOINT:-${CERC_DEFAULT_ETH_RPC_ENDPOINT}}"
|
|
||||||
export CHAIN_ID="${CERC_CHAIN_ID:-${CERC_DEFAULT_CHAIN_ID}}"
|
|
||||||
export ACCOUNT_PRIVATE_KEY="${CERC_ACCOUNT_PRIVATE_KEY:-${CERC_DEFAULT_ACCOUNT_PRIVATE_KEY}}"
|
|
||||||
|
|
||||||
# Option
|
|
||||||
DEPLOY="${CERC_DEPLOY:-${CERC_DEFAULT_DEPLOY}}"
|
|
||||||
|
|
||||||
# Create a .env file
|
|
||||||
echo "ETH_RPC_ENDPOINT=$ETH_RPC_ENDPOINT" > .env
|
|
||||||
echo "CHAIN_ID=$CHAIN_ID" >> .env
|
|
||||||
echo "ACCOUNT_PRIVATE_KEY=$ACCOUNT_PRIVATE_KEY" >> .env
|
|
||||||
|
|
||||||
echo "Using RPC endpoint ${ETH_RPC_ENDPOINT}"
|
|
||||||
|
|
||||||
# Wait for the RPC endpoint to be up
|
|
||||||
endpoint=${ETH_RPC_ENDPOINT#http://}
|
|
||||||
endpoint=${endpoint#https://}
|
|
||||||
RPC_HOST=$(echo "$endpoint" | awk -F'[:/]' '{print $1}')
|
|
||||||
RPC_PORT=$(echo "$endpoint" | awk -F'[:/]' '{print $2}')
|
|
||||||
./wait-for-it.sh -h "${RPC_HOST}" -p "${RPC_PORT}" -s -t 0
|
|
||||||
|
|
||||||
if [ "$DEPLOY" = true ] && [ ! -e "/app/deployments/docker/UniswapV3Factory.json" ]; then
|
|
||||||
echo "Performing core contract deployments..."
|
|
||||||
pnpm hardhat --network docker deploy --tags UniswapV3Factory
|
|
||||||
else
|
|
||||||
echo "Skipping contract deployments"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Done"
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Chain config
|
|
||||||
ETH_RPC_ENDPOINT="${CERC_ETH_RPC_ENDPOINT:-${CERC_DEFAULT_ETH_RPC_ENDPOINT}}"
|
|
||||||
CHAIN_ID="${CERC_CHAIN_ID:-${CERC_DEFAULT_CHAIN_ID}}"
|
|
||||||
ACCOUNT_PRIVATE_KEY="${CERC_ACCOUNT_PRIVATE_KEY:-${CERC_DEFAULT_ACCOUNT_PRIVATE_KEY}}"
|
|
||||||
|
|
||||||
# Option
|
|
||||||
DEPLOY="${CERC_DEPLOY:-${CERC_DEFAULT_DEPLOY}}"
|
|
||||||
|
|
||||||
# Create a .env file
|
|
||||||
echo "ETH_RPC_ENDPOINT=$ETH_RPC_ENDPOINT" > .env
|
|
||||||
echo "CHAIN_ID=$CHAIN_ID" >> .env
|
|
||||||
echo "ACCOUNT_PRIVATE_KEY=$ACCOUNT_PRIVATE_KEY" >> .env
|
|
||||||
|
|
||||||
echo "Using RPC endpoint $ETH_RPC_ENDPOINT"
|
|
||||||
|
|
||||||
# Wait for the RPC endpoint to be up
|
|
||||||
endpoint=${ETH_RPC_ENDPOINT#http://}
|
|
||||||
endpoint=${endpoint#https://}
|
|
||||||
RPC_HOST=$(echo "$endpoint" | awk -F'[:/]' '{print $1}')
|
|
||||||
RPC_PORT=$(echo "$endpoint" | awk -F'[:/]' '{print $2}')
|
|
||||||
./wait-for-it.sh -h "${RPC_HOST}" -p "${RPC_PORT}" -s -t 0
|
|
||||||
|
|
||||||
if [ "$DEPLOY" = true ] && [ ! -e "/app/deployments/docker/NonfungiblePositionManager.json" ]; then
|
|
||||||
# Loop until the factory deployment is detected
|
|
||||||
echo "Waiting for core deployments to occur"
|
|
||||||
while [ ! -f /app/core-deployments/docker/UniswapV3Factory.json ]; do
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Reading factory address from core deployments"
|
|
||||||
FACTORY_ADDRESS=$(jq -r '.address' /app/core-deployments/docker/UniswapV3Factory.json)
|
|
||||||
|
|
||||||
echo "Using UniswapV3Factory at $FACTORY_ADDRESS"
|
|
||||||
echo "FACTORY_ADDRESS=$FACTORY_ADDRESS" >> .env
|
|
||||||
|
|
||||||
echo "Performing periphery contract deployments..."
|
|
||||||
yarn hardhat --network docker deploy --tags NonfungiblePositionManager
|
|
||||||
else
|
|
||||||
echo "Skipping contract deployments"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Done"
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# Chain config
|
|
||||||
|
|
||||||
CERC_DEFAULT_ETH_RPC_ENDPOINT="http://lotus-node-1:1234/rpc/v1"
|
|
||||||
CERC_DEFAULT_CHAIN_ID=31415926
|
|
||||||
|
|
||||||
# From app/data/config/fixturenet-lotus/fund-account.sh
|
|
||||||
CERC_DEFAULT_ACCOUNT_PRIVATE_KEY="0xc05fd3613bcd62a4f25e5eba1f464d0b76d74c3f771a7c2f13e26ad6439444b3"
|
|
||||||
|
|
||||||
# Options
|
|
||||||
|
|
||||||
CERC_DEFAULT_DEPLOY=true
|
|
||||||
@@ -18,8 +18,7 @@ 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=${CERC_STATEDIFF_DB_GOOSE_MIN_VER:-18}
|
CERC_STATEDIFF_DB_GOOSE_MIN_VER=${CERC_STATEDIFF_DB_GOOSE_MIN_VER:-18}
|
||||||
CERC_STATEDIFF_DB_LOG_STATEMENTS="${CERC_STATEDIFF_DB_LOG_STATEMENTS:-false}"
|
CERC_STATEDIFF_DB_LOG_STATEMENTS="false"
|
||||||
CERC_STATEDIFF_WORKERS=2
|
CERC_STATEDIFF_WORKERS=2
|
||||||
|
|
||||||
CERC_GETH_VMODULE="statediff/*=5,rpc/*=5"
|
CERC_GETH_VMODULE="statediff/*=5,rpc/*=5"
|
||||||
CERC_GETH_VERBOSITY=${CERC_GETH_VERBOSITY:-3}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# ETH account with pk c05fd3613bcd62a4f25e5eba1f464d0b76d74c3f771a7c2f13e26ad6439444b3
|
|
||||||
ETH_ADDRESS=0xD375B03bd3A2434A9f675bEC4Ccd68aC5e67C743
|
|
||||||
AMOUNT=1000
|
|
||||||
|
|
||||||
# Pre-fund stat
|
|
||||||
PREFUND_STAT_OUTPUT=$(lotus evm stat $ETH_ADDRESS)
|
|
||||||
|
|
||||||
FILECOIN_ADDRESS=$(echo "$PREFUND_STAT_OUTPUT" | grep -oP 'Filecoin address:\s+\K\S+')
|
|
||||||
echo Filecoin address: "$FILECOIN_ADDRESS"
|
|
||||||
|
|
||||||
echo Sending balance to "$FILECOIN_ADDRESS"
|
|
||||||
lotus send --from $(lotus wallet default) "$FILECOIN_ADDRESS" $AMOUNT
|
|
||||||
|
|
||||||
# Post-fund stat
|
|
||||||
echo lotus evm stat $ETH_ADDRESS
|
|
||||||
lotus evm stat $ETH_ADDRESS
|
|
||||||
|
|
||||||
echo "Account with ETH address $ETH_ADDRESS funded"
|
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
}+V�{iνΆΠΉ�²�¨ΣΗ\k»qς␍—?δΪAΒfκ’~μ©™LΉ�tb·yqτ·²ηξΔ�Ο?ξaΣ�J
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
Βfκ’~μ©™LΉ�tb·yqτ·²ηξΔ�Ο?ξaΣ�J
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
LOTUS_PATH=/root/data/.lotus-local-net
|
LOTUS_PATH=~/.lotus-local-net
|
||||||
LOTUS_MINER_PATH=/root/data/.lotus-miner-local-net
|
LOTUS_MINER_PATH=~/.lotus-miner-local-net
|
||||||
LOTUS_SKIP_GENESIS_CHECK=_yes_
|
LOTUS_SKIP_GENESIS_CHECK=_yes_
|
||||||
LOTUS_FEVM_ENABLEETHRPC=true
|
|
||||||
CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__"
|
CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__"
|
||||||
CGO_CFLAGS="-D__BLST_PORTABLE__"
|
CGO_CFLAGS="-D__BLST_PORTABLE__"
|
||||||
|
|||||||
@@ -2,50 +2,36 @@
|
|||||||
|
|
||||||
lotus --version
|
lotus --version
|
||||||
|
|
||||||
# remove old bootnode peer info if present
|
# # remove old bootnode peer info if present
|
||||||
if [ -f /root/.lotus-shared/miner.addr ]; then
|
# [ -f /root/.lotus-shared/miner.addr ] && rm /root/.lotus-shared/miner.addr
|
||||||
rm /root/.lotus-shared/miner.addr
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if filecoin-proof-parameters exist; avoid fetching if they do
|
##TODO: generate genesis files inside container instead of bundling in config dir
|
||||||
if [ -z "$(find "/var/tmp/filecoin-proof-parameters" -maxdepth 1 -type f)" ]; then
|
##something like commands below should work, other scripts/compose will have to be updated to corresponding directories
|
||||||
echo "Proof params not found, fetching..."
|
# lotus fetch-params 2048
|
||||||
lotus fetch-params 2048
|
# lotus-seed pre-seal --sector-size 2KiB --num-sectors 2
|
||||||
else
|
# lotus-seed genesis new localnet.json
|
||||||
echo "Existing proof params found"
|
# lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json
|
||||||
fi
|
|
||||||
|
|
||||||
# if genesis is not already setup
|
|
||||||
if [ ! -f /root/data/localnet.json ]; then
|
|
||||||
lotus-seed --sector-dir /root/data/.genesis-sectors pre-seal --sector-size 2KiB --num-sectors 2
|
|
||||||
lotus-seed --sector-dir /root/data/.genesis-sectors genesis new /root/data/localnet.json
|
|
||||||
lotus-seed --sector-dir /root/data/.genesis-sectors genesis add-miner /root/data/localnet.json /root/data/.genesis-sectors/pre-seal-t01000.json
|
|
||||||
fi
|
|
||||||
|
|
||||||
# start daemon
|
# start daemon
|
||||||
nohup lotus daemon --lotus-make-genesis=/root/.lotus-shared/devgen.car --profile=bootstrapper --genesis-template=/root/data/localnet.json --bootstrap=false > /var/log/lotus.log 2>&1 &
|
nohup lotus daemon --genesis=/devgen.car --profile=bootstrapper --bootstrap=false > /var/log/lotus.log 2>&1 &
|
||||||
|
|
||||||
# Loop until the daemon is started
|
# Loop until the daemon is started
|
||||||
echo "Waiting for daemon to start..."
|
echo "Waiting for daemon to start..."
|
||||||
while ! grep -q "started ChainNotify channel" /var/log/lotus.log ; do
|
while ! grep -q "started ChainNotify channel" /var/log/lotus.log ; do
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
echo "Daemon started."
|
echo "Daemon started."
|
||||||
|
|
||||||
# if miner not already initialized
|
|
||||||
if [ ! -d $LOTUS_MINER_PATH ]; then
|
|
||||||
# initialize miner
|
|
||||||
lotus wallet import --as-default /root/data/.genesis-sectors/pre-seal-t01000.key
|
|
||||||
|
|
||||||
# fund a known account for usage
|
|
||||||
/fund-account.sh
|
|
||||||
|
|
||||||
echo "Initializing miner..."
|
|
||||||
lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=/root/data/.genesis-sectors --pre-sealed-metadata=/root/data/.genesis-sectors/pre-seal-t01000.json --nosync
|
|
||||||
fi
|
|
||||||
|
|
||||||
# publish bootnode peer info to shared volume
|
# publish bootnode peer info to shared volume
|
||||||
lotus net listen | grep "$(ip addr | grep inet | grep -v '127.0.0.1' | sort | head -1 | awk '{print $2}' | cut -d '/' -f1)" | head -1 > /root/.lotus-shared/miner.addr
|
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
|
# start miner
|
||||||
nohup lotus-miner run --nosync &
|
nohup lotus-miner run --nosync &
|
||||||
|
|||||||
@@ -2,25 +2,23 @@
|
|||||||
|
|
||||||
lotus --version
|
lotus --version
|
||||||
|
|
||||||
# Loop until the daemon is started
|
##TODO: paths can use values from lotus-env.env file
|
||||||
echo "Waiting for miner to share peering info..."
|
|
||||||
while [ ! -f /root/.lotus-shared/miner.addr ]; do
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
echo "Resuming..."
|
|
||||||
|
|
||||||
# init node config
|
# if not already initialized
|
||||||
mkdir -p $LOTUS_PATH
|
if [ ! -f /root/.lotus-local-net/config.toml ]; then
|
||||||
lotus config default > $LOTUS_PATH/config.toml
|
# init node config
|
||||||
|
mkdir $HOME/.lotus-local-net
|
||||||
|
lotus config default > $HOME/.lotus-local-net/config.toml
|
||||||
|
|
||||||
# add bootstrap peer info if available
|
# add bootstrap peer info if available
|
||||||
if [ -f /root/.lotus-shared/miner.addr ]; then
|
if [ -f /root/.lotus-shared/miner.addr ]; then
|
||||||
MINER_ADDR=\"$(cat /root/.lotus-shared/miner.addr)\"
|
MINER_ADDR=\"$(cat /root/.lotus-shared/miner.addr)\"
|
||||||
# add bootstrap peer id to config file
|
# add bootstrap peer id to config file
|
||||||
sed -i "/^\[Libp2p\]/a \ \ BootstrapPeers = [$MINER_ADDR]" $LOTUS_PATH/config.toml
|
sed -i "/^\[Libp2p\]/a \ \ BootstrapPeers = [$MINER_ADDR]" $HOME/.lotus-local-net/config.toml
|
||||||
else
|
else
|
||||||
echo "Bootstrap peer info not found, unable to configure. Manual peering will be required."
|
echo "Bootstrap peer info not found, unable to configure. Manual peering will be required."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# start node
|
# start node
|
||||||
lotus daemon --genesis=/root/.lotus-shared/devgen.car
|
lotus daemon --genesis=/devgen.car
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
See: https://docs.plugeth.org/
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
network: 'lotus-fixturenet',
|
|
||||||
blocks: {
|
|
||||||
address: '0x0000000000000000000000000000000000000000',
|
|
||||||
startBlock: 0,
|
|
||||||
},
|
|
||||||
v3: {
|
|
||||||
factory: {
|
|
||||||
address: 'FACTORY_ADDRESS',
|
|
||||||
startBlock: FACTORY_BLOCK
|
|
||||||
},
|
|
||||||
positionManager: {
|
|
||||||
address: 'NFPM_ADDRESS',
|
|
||||||
startBlock: NFPM_BLOCK
|
|
||||||
},
|
|
||||||
native: { address: 'NATIVE_ADDRESS' },
|
|
||||||
whitelistedTokenAddresses: [
|
|
||||||
'NATIVE_ADDRESS',
|
|
||||||
],
|
|
||||||
stableTokenAddresses: [],
|
|
||||||
nativePricePool: '0x0000000000000000000000000000000000000000',
|
|
||||||
minimumEthLocked: 1.5
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "Building blocks subgraph and deploying to graph-node..."
|
|
||||||
|
|
||||||
cd blocks
|
|
||||||
|
|
||||||
pnpm run generate
|
|
||||||
pnpm run build
|
|
||||||
|
|
||||||
pnpm exec graph create --node http://graph-node:8020/ sushiswap/blocks
|
|
||||||
pnpm exec graph deploy --node http://graph-node:8020/ --ipfs http://ipfs:5001 --version-label 0.1.0 sushiswap/blocks
|
|
||||||
|
|
||||||
echo "Done"
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cd v3
|
|
||||||
|
|
||||||
# Loop until the NFPM deployment is detected
|
|
||||||
echo "Waiting for sushiswap-periphery deployments to occur"
|
|
||||||
while [ ! -f ./periphery-deployments/docker/NonfungiblePositionManager.json ]; do
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Reading contract addresses and block numbers from deployments"
|
|
||||||
FACTORY_ADDRESS=$(jq -r '.address' ./core-deployments/docker/UniswapV3Factory.json)
|
|
||||||
FACTORY_BLOCK=$(jq -r '.receipt.blockNumber' ./core-deployments/docker/UniswapV3Factory.json)
|
|
||||||
NATIVE_ADDRESS=$(jq -r '.address' ./periphery-deployments/docker/WFIL.json)
|
|
||||||
NFPM_ADDRESS=$(jq -r '.address' ./periphery-deployments/docker/NonfungiblePositionManager.json)
|
|
||||||
NFPM_BLOCK=$(jq -r '.receipt.blockNumber' ./periphery-deployments/docker/NonfungiblePositionManager.json)
|
|
||||||
|
|
||||||
# Read the JavaScript file content
|
|
||||||
file_content=$(</app/config/lotus-fixturenet.js.template)
|
|
||||||
|
|
||||||
# Replace uppercase words with environment variables
|
|
||||||
echo "Reading values in lotus-fixturenet config"
|
|
||||||
replaced_content=$(echo "$file_content" | sed -e "s/FACTORY_ADDRESS/$FACTORY_ADDRESS/g" \
|
|
||||||
-e "s/FACTORY_BLOCK/$FACTORY_BLOCK/g" \
|
|
||||||
-e "s/NFPM_ADDRESS/$NFPM_ADDRESS/g" \
|
|
||||||
-e "s/NFPM_BLOCK/$NFPM_BLOCK/g" \
|
|
||||||
-e "s/NATIVE_ADDRESS/$NATIVE_ADDRESS/g")
|
|
||||||
|
|
||||||
# Write the replaced content back to the JavaScript file
|
|
||||||
echo "$replaced_content" > /app/config/lotus-fixturenet.js
|
|
||||||
|
|
||||||
echo "Building v3 subgraph and deploying to graph-node..."
|
|
||||||
|
|
||||||
pnpm run generate
|
|
||||||
pnpm run build
|
|
||||||
|
|
||||||
pnpm exec graph create --node http://graph-node:8020/ sushiswap/v3-lotus
|
|
||||||
pnpm exec graph deploy --node http://graph-node:8020/ --ipfs http://ipfs:5001 --version-label 0.1.0 sushiswap/v3-lotus
|
|
||||||
|
|
||||||
echo "Done"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
CERC_ETHPXY_LISTEN_PORT=8547
|
|
||||||
CERC_ETHPXY_LISTEN_ADDR='0.0.0.0'
|
|
||||||
CERC_ETHPXY_REDIS_URL='redis://mainnet-eth-api-proxy-redis:6379'
|
|
||||||
CERC_ETHPXY_REDIS_MAX_AGE=120000
|
|
||||||
CERC_ETHPXY_GETH_WS_URL='ws://mainnet-eth-geth-1:8546'
|
|
||||||
CERC_ETHPXY_GETH_HTTP_URL='http://mainnet-eth-geth-1:8545'
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,29 +0,0 @@
|
|||||||
POSTGRES_DB=keycloak
|
|
||||||
POSTGRES_USER=keycloak
|
|
||||||
POSTGRES_PASSWORD=keycloak
|
|
||||||
KC_DB=postgres
|
|
||||||
KC_DB_URL_HOST=keycloak-db
|
|
||||||
KC_DB_URL_DATABASE=${POSTGRES_DB}
|
|
||||||
KC_DB_USERNAME=${POSTGRES_USER}
|
|
||||||
KC_DB_PASSWORD=${POSTGRES_PASSWORD}
|
|
||||||
KC_DB_SCHEMA=public
|
|
||||||
KC_HOSTNAME=localhost
|
|
||||||
KC_HTTP_ENABLED="true"
|
|
||||||
KC_HTTP_RELATIVE_PATH="/auth"
|
|
||||||
KC_HOSTNAME_STRICT_HTTPS="false"
|
|
||||||
KEYCLOAK_ADMIN=admin
|
|
||||||
KEYCLOAK_ADMIN_PASSWORD=admin
|
|
||||||
X_API_CHECK_REALM=cerc
|
|
||||||
X_API_CHECK_CLIENT_ID="%user_id%"
|
|
||||||
|
|
||||||
|
|
||||||
# keycloak-reg-api
|
|
||||||
CERC_KCUSERREG_LISTEN_PORT=9292
|
|
||||||
CERC_KCUSERREG_LISTEN_ADDR='0.0.0.0'
|
|
||||||
CERC_KCUSERREG_API_URL='http://keycloak:8080/auth'
|
|
||||||
CERC_KCUSERREG_REG_USER="${KEYCLOAK_ADMIN}"
|
|
||||||
CERC_KCUSERREG_REG_PW="${KEYCLOAK_ADMIN_PASSWORD}"
|
|
||||||
CERC_KCUSERREG_REG_CLIENT_ID='admin-cli'
|
|
||||||
CERC_KCUSERREG_TARGET_REALM=cerc
|
|
||||||
CERC_KCUSERREG_TARGET_GROUPS=eth
|
|
||||||
CERC_KCUSERREG_CREATE_ENABLED=true
|
|
||||||
@@ -1,107 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name my.example.com;
|
|
||||||
|
|
||||||
# See: https://github.com/acmesh-official/acme.sh/wiki/Stateless-Mode
|
|
||||||
# and https://datatracker.ietf.org/doc/html/rfc8555
|
|
||||||
location ~ ^/\.well-known/acme-challenge/([-_a-zA-Z0-9]+)$ {
|
|
||||||
default_type text/plain;
|
|
||||||
return 200 "$1.MY_ACCOUNT_THUMBPRINT_GOES_HERE";
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
return 301 https://$host$request_uri;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream geth-pool {
|
|
||||||
keepalive 100;
|
|
||||||
hash $user_id consistent;
|
|
||||||
server server-a:8545;
|
|
||||||
server server-b:8545;
|
|
||||||
server server-c:8545;
|
|
||||||
}
|
|
||||||
|
|
||||||
# self-reg happens on one server for clarity
|
|
||||||
upstream reg-ui-pool {
|
|
||||||
keepalive 100;
|
|
||||||
server server-a:8085;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream reg-api-pool {
|
|
||||||
keepalive 100;
|
|
||||||
server server-a:8086;
|
|
||||||
}
|
|
||||||
|
|
||||||
# auth uses server-a if available
|
|
||||||
upstream auth-pool {
|
|
||||||
keepalive 100;
|
|
||||||
server server-a:8080;
|
|
||||||
server server-b:8080 backup;
|
|
||||||
server server-c:8080 backup;
|
|
||||||
}
|
|
||||||
|
|
||||||
log_format upstreamlog '[$time_local] $remote_addr $user_id - $server_name $host to: $upstream_addr: $request $status upstream_response_time $upstream_response_time msec $msec request_time $request_time';
|
|
||||||
proxy_cache_path /var/cache/nginx/auth_cache levels=1 keys_zone=auth_cache:1m max_size=5m inactive=60m;
|
|
||||||
server {
|
|
||||||
listen 443 ssl http2;
|
|
||||||
server_name my.example.com;
|
|
||||||
access_log /var/log/nginx/my.example.com-access.log upstreamlog;
|
|
||||||
error_log /var/log/nginx/my.example.com-error.log;
|
|
||||||
|
|
||||||
ssl_certificate /etc/nginx/ssl/my.example.com/cert.pem;
|
|
||||||
ssl_certificate_key /etc/nginx/ssl/my.example.com/key.pem;
|
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
|
||||||
location = /50x.html {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
}
|
|
||||||
|
|
||||||
#rewrite ^/?$ /newuser/;
|
|
||||||
rewrite ^/?$ https://www.example.com/;
|
|
||||||
|
|
||||||
|
|
||||||
# geth-pool ETH API
|
|
||||||
location ~ ^/v1/eth/?([^/]*)$ {
|
|
||||||
set $apiKey $1;
|
|
||||||
if ($apiKey = '') {
|
|
||||||
set $apiKey $http_X_API_KEY;
|
|
||||||
}
|
|
||||||
auth_request /auth;
|
|
||||||
auth_request_set $user_id $sent_http_x_user_id;
|
|
||||||
rewrite /.*$ / break;
|
|
||||||
|
|
||||||
client_max_body_size 3m;
|
|
||||||
client_body_buffer_size 3m;
|
|
||||||
proxy_buffer_size 32k;
|
|
||||||
proxy_buffers 16 32k;
|
|
||||||
proxy_busy_buffers_size 96k;
|
|
||||||
|
|
||||||
proxy_pass http://geth-pool;
|
|
||||||
proxy_set_header X-Original-Remote-Addr $remote_addr;
|
|
||||||
proxy_set_header X-User-Id $user_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
# keycloak
|
|
||||||
location = /auth {
|
|
||||||
internal;
|
|
||||||
proxy_cache auth_cache;
|
|
||||||
proxy_cache_key "$apiKey";
|
|
||||||
proxy_cache_valid 200 300s;
|
|
||||||
proxy_cache_valid 401 30s;
|
|
||||||
proxy_pass http://auth-pool/auth/realms/cerc/check?memberOf=eth&apiKey=$apiKey;
|
|
||||||
proxy_pass_request_body off;
|
|
||||||
proxy_set_header Content-Length "";
|
|
||||||
proxy_set_header X-Original-URI $request_uri;
|
|
||||||
proxy_set_header X-Original-Remote-Addr $remote_addr;
|
|
||||||
proxy_set_header X-Original-Host $host;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /newuser/ {
|
|
||||||
proxy_pass http://reg-ui-pool/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /user-api/ {
|
|
||||||
proxy_pass http://reg-api-pool/;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,139 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import psycopg
|
|
||||||
import random
|
|
||||||
|
|
||||||
from subprocess import Popen
|
|
||||||
from fabric import Connection
|
|
||||||
|
|
||||||
|
|
||||||
def dump_src_db_to_file(db_host, db_port, db_user, db_password, db_name, file_name):
|
|
||||||
command = f"pg_dump -h {db_host} -p {db_port} -U {db_user} -d {db_name} -c --inserts -f {file_name}"
|
|
||||||
my_env = os.environ.copy()
|
|
||||||
my_env["PGPASSWORD"] = db_password
|
|
||||||
print(f"Exporting from {db_host}:{db_port}/{db_name} to {file_name}... ", end="")
|
|
||||||
ret = Popen(command, shell=True, env=my_env).wait()
|
|
||||||
print("DONE")
|
|
||||||
return ret
|
|
||||||
|
|
||||||
|
|
||||||
def establish_ssh_tunnel(ssh_host, ssh_port, ssh_user, db_host, db_port):
|
|
||||||
local_port = random.randint(11000, 12000)
|
|
||||||
conn = Connection(host=ssh_host, port=ssh_port, user=ssh_user)
|
|
||||||
fw = conn.forward_local(
|
|
||||||
local_port=local_port, remote_port=db_port, remote_host=db_host
|
|
||||||
)
|
|
||||||
return conn, fw, local_port
|
|
||||||
|
|
||||||
|
|
||||||
def load_db_from_file(db_host, db_port, db_user, db_password, db_name, file_name):
|
|
||||||
connstr = "host=%s port=%s user=%s password=%s sslmode=disable dbname=%s" % (
|
|
||||||
db_host,
|
|
||||||
db_port,
|
|
||||||
db_user,
|
|
||||||
db_password,
|
|
||||||
db_name,
|
|
||||||
)
|
|
||||||
with psycopg.connect(connstr) as conn:
|
|
||||||
with conn.cursor() as cur:
|
|
||||||
print(
|
|
||||||
f"Importing from {file_name} to {db_host}:{db_port}/{db_name}... ",
|
|
||||||
end="",
|
|
||||||
)
|
|
||||||
cur.execute(open(file_name, "rt").read())
|
|
||||||
print("DONE")
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
|
|
||||||
parser.add_argument("--src-dbhost", help="DB hostname", default="localhost")
|
|
||||||
parser.add_argument("--src-dbport", help="DB port", default=5432, type=int)
|
|
||||||
parser.add_argument("--src-dbuser", help="DB username", default="keycloak")
|
|
||||||
parser.add_argument("--src-dbpw", help="DB password", required=True)
|
|
||||||
parser.add_argument("--src-dbname", help="dbname", default="keycloak")
|
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
"--dst-file", help="Destination filename", default="keycloak-mirror.sql"
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument("--live-import", help="run the import", action="store_true")
|
|
||||||
|
|
||||||
parser.add_argument("--dst-dbhost", help="DB hostname", default="localhost")
|
|
||||||
parser.add_argument("--dst-dbport", help="DB port", default=5432, type=int)
|
|
||||||
parser.add_argument("--dst-dbuser", help="DB username", default="keycloak")
|
|
||||||
parser.add_argument("--dst-dbpw", help="DB password")
|
|
||||||
parser.add_argument("--dst-dbname", help="dbname", default="keycloak")
|
|
||||||
|
|
||||||
parser.add_argument("--ssh-host", help="SSH hostname")
|
|
||||||
parser.add_argument("--ssh-port", help="SSH port", default=22, type=int)
|
|
||||||
parser.add_argument("--ssh-user", help="SSH user")
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
if args.live_import and not args.dst_dbpw:
|
|
||||||
print("--dst-dbpw is required if importing", file=sys.stderr)
|
|
||||||
sys.exit(2)
|
|
||||||
|
|
||||||
remove_sql_file = False
|
|
||||||
if args.dst_dbhost and not args.dst_file:
|
|
||||||
remove_sql_file = True
|
|
||||||
|
|
||||||
dst_file = args.dst_file
|
|
||||||
if not dst_file:
|
|
||||||
dst_file = "keycloak-mirror.sql"
|
|
||||||
|
|
||||||
dump_src_db_to_file(
|
|
||||||
args.src_dbhost,
|
|
||||||
args.src_dbport,
|
|
||||||
args.src_dbuser,
|
|
||||||
args.src_dbpw,
|
|
||||||
args.src_dbname,
|
|
||||||
dst_file,
|
|
||||||
)
|
|
||||||
|
|
||||||
if args.live_import:
|
|
||||||
try:
|
|
||||||
if args.ssh_host:
|
|
||||||
dst_dbport = random.randint(11000, 12000)
|
|
||||||
print(
|
|
||||||
f"Establishing SSH tunnel from 127.0.0.1:{dst_dbport} to "
|
|
||||||
"{args.ssh_host}->{args.dst_dbhost}:{args.dst_dbport}... ",
|
|
||||||
end="",
|
|
||||||
)
|
|
||||||
with Connection(
|
|
||||||
host=args.ssh_host, port=args.ssh_port, user=args.ssh_user
|
|
||||||
).forward_local(
|
|
||||||
local_port=dst_dbport,
|
|
||||||
remote_port=args.dst_dbport,
|
|
||||||
remote_host=args.dst_dbhost,
|
|
||||||
):
|
|
||||||
print("DONE")
|
|
||||||
|
|
||||||
load_db_from_file(
|
|
||||||
args.dst_dbhost,
|
|
||||||
args.dst_dbport,
|
|
||||||
args.dst_dbuser,
|
|
||||||
args.dst_dbpw,
|
|
||||||
args.dst_dbname,
|
|
||||||
dst_file,
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
load_db_from_file(
|
|
||||||
args.dst_dbhost,
|
|
||||||
args.dst_dbport,
|
|
||||||
args.dst_dbuser,
|
|
||||||
args.dst_dbpw,
|
|
||||||
args.dst_dbname,
|
|
||||||
dst_file,
|
|
||||||
)
|
|
||||||
|
|
||||||
finally:
|
|
||||||
if args.live_import:
|
|
||||||
print(f"Removing {dst_file}... ", end="")
|
|
||||||
os.remove(dst_file)
|
|
||||||
print("DONE")
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
fabric
|
|
||||||
psycopg~=3.1.8
|
|
||||||
psycopg_binary
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
web:
|
|
||||||
path: ''
|
|
||||||
api:
|
|
||||||
url: 'http://keycloak-reg-api:9292'
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,9 +0,0 @@
|
|||||||
apiVersion: 1
|
|
||||||
|
|
||||||
providers:
|
|
||||||
- name: dashboards
|
|
||||||
type: file
|
|
||||||
updateIntervalSeconds: 10
|
|
||||||
options:
|
|
||||||
path: /etc/grafana/dashboards
|
|
||||||
foldersFromFilesStructure: true
|
|
||||||
-19
@@ -1,19 +0,0 @@
|
|||||||
apiVersion: 1
|
|
||||||
|
|
||||||
datasources:
|
|
||||||
- id: 1
|
|
||||||
uid: jZUuGao4k
|
|
||||||
orgId: 1
|
|
||||||
name: Prometheus
|
|
||||||
type: prometheus
|
|
||||||
typeName: Prometheus
|
|
||||||
typeLogoUrl: public/app/plugins/datasource/prometheus/img/prometheus_logo.svg
|
|
||||||
access: proxy
|
|
||||||
url: http://prometheus:9090
|
|
||||||
user: ""
|
|
||||||
database: ""
|
|
||||||
basicAuth: false
|
|
||||||
isDefault: true
|
|
||||||
jsonData:
|
|
||||||
httpMethod: POST
|
|
||||||
readOnly: false
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# grafana
|
|
||||||
GF_SECURITY_ADMIN_PASSWORD=changeme6325
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
global:
|
|
||||||
scrape_interval: 5s
|
|
||||||
evaluation_interval: 15s
|
|
||||||
|
|
||||||
scrape_configs:
|
|
||||||
# geth
|
|
||||||
- job_name: 'geth'
|
|
||||||
metrics_path: /debug/metrics/prometheus
|
|
||||||
scheme: http
|
|
||||||
static_configs:
|
|
||||||
- targets: ['mainnet-eth-geth-1:6060']
|
|
||||||
|
|
||||||
# lighthouse
|
|
||||||
- job_name: 'lighthouse'
|
|
||||||
metrics_path: /metrics
|
|
||||||
scheme: http
|
|
||||||
static_configs:
|
|
||||||
- targets: ['mainnet-eth-lighthouse-1:5054']
|
|
||||||
|
|
||||||
# keycloak
|
|
||||||
- job_name: 'keycloak'
|
|
||||||
scrape_interval: 5s
|
|
||||||
metrics_path: /auth/realms/cerc/metrics
|
|
||||||
scheme: http
|
|
||||||
static_configs:
|
|
||||||
- targets: ['keycloak:8080']
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
# Enable remote debugging using dlv
|
|
||||||
CERC_REMOTE_DEBUG=false
|
|
||||||
|
|
||||||
# Enable startup script debug output.
|
|
||||||
CERC_SCRIPT_DEBUG=false
|
|
||||||
|
|
||||||
# Simple toggle to choose either a 'full' node or an 'archive' node
|
|
||||||
# (controls the values of --syncmode --gcmode --snapshot)
|
|
||||||
CERC_GETH_MODE_QUICK_SET=full
|
|
||||||
|
|
||||||
# Optional custom node name.
|
|
||||||
# GETH_NODE_NAME=""
|
|
||||||
|
|
||||||
# Specify any other geth CLI options.
|
|
||||||
GETH_OPTS=""
|
|
||||||
|
|
||||||
# --cache
|
|
||||||
GETH_CACHE=1024
|
|
||||||
|
|
||||||
# --cache.database
|
|
||||||
GETH_CACHE_DB=50
|
|
||||||
|
|
||||||
# --cache.gc
|
|
||||||
GETH_CACHE_GC=25
|
|
||||||
|
|
||||||
# --cache.trie
|
|
||||||
GETH_CACHE_TRIE=15
|
|
||||||
j
|
|
||||||
# --datadir
|
|
||||||
GETH_DATADIR="/data"
|
|
||||||
|
|
||||||
# --http.api
|
|
||||||
GETH_HTTP_API="eth,web3,net"
|
|
||||||
|
|
||||||
# --authrpc.jwtsecret
|
|
||||||
GETH_JWTSECRET="/etc/mainnet-eth/jwtsecret"
|
|
||||||
|
|
||||||
# --maxpeers
|
|
||||||
GETH_MAX_PEERS=100
|
|
||||||
|
|
||||||
# --rpc.evmtimeout
|
|
||||||
GETH_RPC_EVMTIMEOUT=0
|
|
||||||
|
|
||||||
# --rpc.gascap
|
|
||||||
GETH_RPC_GASCAP=0
|
|
||||||
|
|
||||||
# --txlookuplimit
|
|
||||||
GETH_TXLOOKUPLIMIT=0
|
|
||||||
|
|
||||||
# --verbosity
|
|
||||||
GETH_VERBOSITY=3
|
|
||||||
|
|
||||||
# --log.vmodule
|
|
||||||
GETH_VMODULE="rpc/*=4"
|
|
||||||
|
|
||||||
# --ws.api
|
|
||||||
GETH_WS_API="eth,web3,net"
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
# Enable startup script debug output.
|
|
||||||
CERC_SCRIPT_DEBUG=false
|
|
||||||
|
|
||||||
# Specify any other lighthouse CLI options.
|
|
||||||
LIGHTHOUSE_OPTS=""
|
|
||||||
|
|
||||||
# Override the advertised public IP (optional)
|
|
||||||
# --enr-address
|
|
||||||
#LIGHTHOUSE_ENR_ADDRESS=""
|
|
||||||
|
|
||||||
# --checkpoint-sync-url
|
|
||||||
LIGHTHOUSE_CHECKPOINT_SYNC_URL="https://beaconstate.ethstaker.cc"
|
|
||||||
|
|
||||||
# --checkpoint-sync-url-timeout
|
|
||||||
LIGHTHOUSE_CHECKPOINT_SYNC_URL_TIMEOUT=300
|
|
||||||
|
|
||||||
# --datadir
|
|
||||||
LIGHTHOUSE_DATADIR=/data
|
|
||||||
|
|
||||||
# --debug-level
|
|
||||||
LIGHTHOUSE_DEBUG_LEVEL=info
|
|
||||||
|
|
||||||
# --http-port
|
|
||||||
LIGHTHOUSE_HTTP_PORT=5052
|
|
||||||
|
|
||||||
# --execution-jwt
|
|
||||||
LIGHTHOUSE_JWTSECRET=/etc/mainnet-eth/jwtsecret
|
|
||||||
|
|
||||||
# --metrics-port
|
|
||||||
LIGHTHOUSE_METRICS_PORT=5054
|
|
||||||
|
|
||||||
# --port --enr-udp-port --enr-tcp-port
|
|
||||||
LIGHTHOUSE_NETWORK_PORT=9000
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
if [[ "true" == "$CERC_SCRIPT_DEBUG" ]]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
START_CMD="geth"
|
|
||||||
if [[ "true" == "$CERC_REMOTE_DEBUG" ]] && [[ -x "/usr/local/bin/dlv" ]]; then
|
|
||||||
START_CMD="/usr/local/bin/dlv --listen=:40000 --headless=true --api-version=2 --accept-multiclient exec /usr/local/bin/geth --continue --"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# See https://linuxconfig.org/how-to-propagate-a-signal-to-child-processes-from-a-bash-script
|
|
||||||
cleanup() {
|
|
||||||
echo "Signal received, cleaning up..."
|
|
||||||
|
|
||||||
# Kill the child process first (CERC_REMOTE_DEBUG=true uses dlv which starts geth as a child process)
|
|
||||||
pkill -P ${geth_pid}
|
|
||||||
sleep 2
|
|
||||||
kill $(jobs -p)
|
|
||||||
|
|
||||||
wait
|
|
||||||
echo "Done"
|
|
||||||
}
|
|
||||||
trap 'cleanup' SIGINT SIGTERM
|
|
||||||
|
|
||||||
MODE_FLAGS=""
|
|
||||||
if [[ "$CERC_GETH_MODE_QUICK_SET" = "archive" ]]; then
|
|
||||||
MODE_FLAGS="--syncmode=${GETH_SYNC_MODE:-full} --gcmode=${GETH_GC_MODE:-archive} --snapshot=${GETH_SNAPSHOT:-false}"
|
|
||||||
else
|
|
||||||
MODE_FLAGS="--syncmode=${GETH_SYNC_MODE:-snap} --gcmode=${GETH_GC_MODE:-full} --snapshot=${GETH_SNAPSHOT:-true}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$START_CMD \
|
|
||||||
$MODE_FLAGS \
|
|
||||||
--datadir="${GETH_DATADIR}"\
|
|
||||||
--identity="${GETH_NODE_NAME}" \
|
|
||||||
--maxpeers=${GETH_MAX_PEERS} \
|
|
||||||
--cache=${GETH_CACHE} \
|
|
||||||
--cache.gc=${GETH_CACHE_GC} \
|
|
||||||
--cache.database=${GETH_CACHE_DB} \
|
|
||||||
--cache.trie=${GETH_CACHE_TRIE} \
|
|
||||||
--authrpc.addr='0.0.0.0' \
|
|
||||||
--authrpc.vhosts='*' \
|
|
||||||
--authrpc.jwtsecret="${GETH_JWTSECRET}" \
|
|
||||||
--http \
|
|
||||||
--http.addr='0.0.0.0' \
|
|
||||||
--http.api="${GETH_HTTP_API}" \
|
|
||||||
--http.vhosts='*' \
|
|
||||||
--metrics \
|
|
||||||
--metrics.addr='0.0.0.0' \
|
|
||||||
--ws \
|
|
||||||
--ws.addr='0.0.0.0' \
|
|
||||||
--ws.api="${GETH_WS_API}" \
|
|
||||||
--rpc.gascap=${GETH_RPC_GASCAP} \
|
|
||||||
--rpc.evmtimeout=${GETH_RPC_EVMTIMEOUT} \
|
|
||||||
--txlookuplimit=${GETH_TXLOOKUPLIMIT} \
|
|
||||||
--verbosity=${GETH_VERBOSITY} \
|
|
||||||
--log.vmodule="${GETH_VMODULE}" \
|
|
||||||
${GETH_OPTS} &
|
|
||||||
|
|
||||||
geth_pid=$!
|
|
||||||
wait $geth_pid
|
|
||||||
|
|
||||||
if [ "true" == "$CERC_KEEP_RUNNING_AFTER_GETH_EXIT" ]; then
|
|
||||||
while [ 1 -eq 1 ]; do
|
|
||||||
sleep 60
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
if [[ "true" == "$CERC_SCRIPT_DEBUG" ]]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
ENR_OPTS=""
|
|
||||||
if [[ -n "$LIGHTHOUSE_ENR_ADDRESS" ]]; then
|
|
||||||
ENR_OPTS="--enr-address $LIGHTHOUSE_ENR_ADDRESS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec lighthouse bn \
|
|
||||||
--checkpoint-sync-url "$LIGHTHOUSE_CHECKPOINT_SYNC_URL" \
|
|
||||||
--checkpoint-sync-url-timeout ${LIGHTHOUSE_CHECKPOINT_SYNC_URL_TIMEOUT} \
|
|
||||||
--datadir "$LIGHTHOUSE_DATADIR" \
|
|
||||||
--debug-level $LIGHTHOUSE_DEBUG_LEVEL \
|
|
||||||
--disable-deposit-contract-sync \
|
|
||||||
--disable-upnp \
|
|
||||||
--enr-tcp-port $LIGHTHOUSE_NETWORK_PORT \
|
|
||||||
--enr-udp-port $LIGHTHOUSE_NETWORK_PORT \
|
|
||||||
--execution-endpoint "$LIGHTHOUSE_EXECUTION_ENDPOINT" \
|
|
||||||
--execution-jwt /etc/mainnet-eth/jwtsecret \
|
|
||||||
--http \
|
|
||||||
--http-address 0.0.0.0 \
|
|
||||||
--http-port $LIGHTHOUSE_HTTP_PORT \
|
|
||||||
--metrics \
|
|
||||||
--metrics-address=0.0.0.0 \
|
|
||||||
--metrics-port $LIGHTHOUSE_METRICS_PORT \
|
|
||||||
--network mainnet \
|
|
||||||
--port $LIGHTHOUSE_NETWORK_PORT \
|
|
||||||
$ENR_OPTS $LIGHTHOUSE_OPTS
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# download genesis file
|
|
||||||
wget https://download.fantom.network/mainnet-109331-no-history.g
|
|
||||||
|
|
||||||
./opera --genesis=mainnet-109331-no-history.g --db.preset ldb-1 --syncmode snap --http --http.addr="0.0.0.0" --http.corsdomain="*" --http.api=eth,web3,net,txpool,ftm --ws --ws.addr="0.0.0.0" --ws.origins="*" --ws.api=eth,web3,net,txpool,ftm --cache 8192
|
|
||||||
#tail -f /dev/null
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
services:
|
|
||||||
cns:
|
|
||||||
restEndpoint: 'http://laconicd:1317'
|
|
||||||
gqlEndpoint: 'http://laconicd:9473/api'
|
|
||||||
userKey: REPLACE_WITH_MYKEY
|
|
||||||
bondId:
|
|
||||||
chainId: laconic_9000-1
|
|
||||||
gas: 250000
|
|
||||||
fees: 200000aphoton
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
laconicd keys show mykey | grep address | cut -d ' ' -f 3
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
echo y | laconicd keys export mykey --unarmored-hex --unsafe
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
#TODO: pass these in from the caller
|
|
||||||
TRACE="--trace"
|
|
||||||
LOGLEVEL="info"
|
|
||||||
|
|
||||||
laconicd start \
|
|
||||||
--pruning=nothing \
|
|
||||||
--evm.tracer=json $TRACE \
|
|
||||||
--log_level $LOGLEVEL \
|
|
||||||
--minimum-gas-prices=0.0001aphoton \
|
|
||||||
--json-rpc.api eth,txpool,personal,net,debug,web3,miner \
|
|
||||||
--api.enable \
|
|
||||||
--gql-server \
|
|
||||||
--gql-playground
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Wait for reth container to create jwt auth token
|
|
||||||
while [ ! -f /root/.shared_data/jwt.hex ]; do
|
|
||||||
echo "Jwt auth token not found, sleeping for 5s..."
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Jwt token found. Starting Lighthouse..."
|
|
||||||
export RUST_LOG=info
|
|
||||||
lighthouse bn \
|
|
||||||
--network mainnet \
|
|
||||||
--execution-endpoint http://reth:8551 \
|
|
||||||
--execution-jwt /root/.shared_data/jwt.hex \
|
|
||||||
--checkpoint-sync-url https://mainnet.checkpoint.sigp.io \
|
|
||||||
--disable-deposit-contract-sync
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# generate jwt token for reth/lighthouse authentication
|
|
||||||
echo "Installing OpenSSL..."
|
|
||||||
apt update
|
|
||||||
apt install openssl
|
|
||||||
echo "Generating jwt token for lighthouse auth..."
|
|
||||||
openssl rand -hex 32 | tr -d "\n" | tee /root/.shared_data/jwt.hex
|
|
||||||
|
|
||||||
# start reth
|
|
||||||
echo "Starting Reth..."
|
|
||||||
export RUST_LOG=info
|
|
||||||
reth node \
|
|
||||||
--authrpc.jwtsecret /root/.shared_data/jwt.hex \
|
|
||||||
--authrpc.addr 0.0.0.0 \
|
|
||||||
--authrpc.port 8551 \
|
|
||||||
--http \
|
|
||||||
--http.addr 0.0.0.0 \
|
|
||||||
--http.corsdomain * \
|
|
||||||
--http.api eth,web3,net,rpc \
|
|
||||||
--ws \
|
|
||||||
--ws.addr 0.0.0.0 \
|
|
||||||
--ws.origins * \
|
|
||||||
--ws.api eth,web3,net,rpc
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
const NATIVE_ADDRESS = '0x60e1773636cf5e4a227d9ac24f20feca034ee25a'
|
|
||||||
const USDC_ADDRESS = '0xeb466342c4d449bc9f53a865d5cb90586f405215'
|
|
||||||
const DAI_ADDRESS = '0x5c7e299cf531eb66f2a1df637d37abb78e6200c7'
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
network: 'filecoin',
|
|
||||||
blocks: {
|
|
||||||
address: '0x719e14fcb364bb05649bd525eb6c4a2d0d4ea2b7',
|
|
||||||
startBlock: 2867000,
|
|
||||||
},
|
|
||||||
v3: {
|
|
||||||
factory: { // 0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6
|
|
||||||
address: '0xc35dadb65012ec5796536bd9864ed8773abc74c4',
|
|
||||||
startBlock: 2867560,
|
|
||||||
},
|
|
||||||
positionManager: {
|
|
||||||
address: '0xf4d73326c13a4fc5fd7a064217e12780e9bd62c3',
|
|
||||||
startBlock: 2868037,
|
|
||||||
},
|
|
||||||
native: { address: NATIVE_ADDRESS },
|
|
||||||
whitelistedTokenAddresses: [
|
|
||||||
NATIVE_ADDRESS,
|
|
||||||
USDC_ADDRESS,
|
|
||||||
DAI_ADDRESS,
|
|
||||||
],
|
|
||||||
stableTokenAddresses: [USDC_ADDRESS, DAI_ADDRESS],
|
|
||||||
nativePricePool: '0x1d1375281265e4dd496d90455f7c82f4fbd85cc2',
|
|
||||||
minimumEthLocked: 250
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "Building blocks subgraph and deploying to graph-node..."
|
|
||||||
|
|
||||||
cd blocks
|
|
||||||
|
|
||||||
pnpm run generate
|
|
||||||
pnpm run build
|
|
||||||
|
|
||||||
pnpm exec graph create --node http://graph-node:8020/ sushiswap/blocks
|
|
||||||
pnpm exec graph deploy --node http://graph-node:8020/ --ipfs http://ipfs:5001 --version-label 0.1.0 sushiswap/blocks
|
|
||||||
|
|
||||||
echo "Done"
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "Building v3 subgraph and deploying to graph-node..."
|
|
||||||
|
|
||||||
cd v3
|
|
||||||
|
|
||||||
pnpm run generate
|
|
||||||
pnpm run build
|
|
||||||
|
|
||||||
pnpm exec graph create --node http://graph-node:8020/ sushiswap/v3-filecoin
|
|
||||||
pnpm exec graph deploy --node http://graph-node:8020/ --ipfs http://ipfs:5001 --version-label 0.1.0 sushiswap/v3-filecoin
|
|
||||||
|
|
||||||
echo "Done"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "MobyMask",
|
|
||||||
"relayNodes": [],
|
|
||||||
"peer": {
|
|
||||||
"enableDebugInfo": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -8,7 +8,6 @@ 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_DENY_MULTIADDRS="${CERC_DENY_MULTIADDRS:-${DEFAULT_CERC_DENY_MULTIADDRS}}"
|
||||||
CERC_PUBSUB="${CERC_PUBSUB:-${DEFAULT_CERC_PUBSUB}}"
|
|
||||||
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
|
||||||
@@ -34,24 +33,11 @@ else
|
|||||||
echo "Taking deployed contract details from env"
|
echo "Taking deployed contract details from env"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /app
|
# Use yq to create config.yml with environment variables
|
||||||
git checkout $CERC_RELEASE
|
yq -n ".address = env(CERC_DEPLOYED_CONTRACT)" > /config/config.yml
|
||||||
|
yq ".watcherUrl = env(CERC_APP_WATCHER_URL)" -i /config/config.yml
|
||||||
|
yq ".chainId = env(CERC_CHAIN_ID)" -i /config/config.yml
|
||||||
|
yq ".relayNodes = strenv(CERC_RELAY_NODES)" -i /config/config.yml
|
||||||
|
yq ".denyMultiaddrs = strenv(CERC_DENY_MULTIADDRS)" -i /config/config.yml
|
||||||
|
|
||||||
# Export config values in a json file
|
/scripts/start-serving-app.sh
|
||||||
jq --arg address "$CERC_DEPLOYED_CONTRACT" \
|
|
||||||
--argjson chainId "$CERC_CHAIN_ID" \
|
|
||||||
--argjson relayNodes "$CERC_RELAY_NODES" \
|
|
||||||
--argjson denyMultiaddrs "$CERC_DENY_MULTIADDRS" \
|
|
||||||
--arg pubsub "$CERC_PUBSUB" \
|
|
||||||
'.address = $address | .chainId = $chainId | .relayNodes = $relayNodes | .peer.denyMultiaddrs = $denyMultiaddrs | .peer.pubsub = $pubsub' \
|
|
||||||
/app/src/mobymask-app-config.json > /app/${CERC_CONFIG_FILE}
|
|
||||||
|
|
||||||
if [ "${CERC_USE_NPM}" = "true" ]; then
|
|
||||||
npm install
|
|
||||||
REACT_APP_WATCHER_URI="$CERC_APP_WATCHER_URL/graphql" npm run build
|
|
||||||
else
|
|
||||||
yarn install
|
|
||||||
REACT_APP_WATCHER_URI="$CERC_APP_WATCHER_URL/graphql" yarn build
|
|
||||||
fi
|
|
||||||
|
|
||||||
http-server -p 80 /app/build
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ DEFAULT_CERC_RELAY_PEERS=[]
|
|||||||
DEFAULT_CERC_RELAY_ANNOUNCE_DOMAIN=
|
DEFAULT_CERC_RELAY_ANNOUNCE_DOMAIN=
|
||||||
|
|
||||||
# Base URI for mobymask-app (used for generating invite)
|
# Base URI for mobymask-app (used for generating invite)
|
||||||
DEFAULT_CERC_MOBYMASK_APP_BASE_URI="http://127.0.0.1:3004/#"
|
DEFAULT_CERC_MOBYMASK_APP_BASE_URI="http://127.0.0.1:3002/#"
|
||||||
|
|
||||||
# Set to false for disabling watcher peer to send txs to L2
|
# Set to false for disabling watcher peer to send txs to L2
|
||||||
DEFAULT_CERC_ENABLE_PEER_L2_TXS=true
|
DEFAULT_CERC_ENABLE_PEER_L2_TXS=true
|
||||||
@@ -27,6 +27,3 @@ DEFAULT_CERC_RELAY_NODES=[]
|
|||||||
|
|
||||||
# Set of multiaddrs to be avoided while dialling
|
# Set of multiaddrs to be avoided while dialling
|
||||||
DEFAULT_CERC_DENY_MULTIADDRS=[]
|
DEFAULT_CERC_DENY_MULTIADDRS=[]
|
||||||
|
|
||||||
# Type of pubsub to be used
|
|
||||||
DEFAULT_CERC_PUBSUB=""
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ CERC_L1_ACCOUNTS_CSV_URL="${CERC_L1_ACCOUNTS_CSV_URL:-${DEFAULT_CERC_L1_ACCOUNTS
|
|||||||
|
|
||||||
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_DENY_MULTIADDRS="${CERC_DENY_MULTIADDRS:-${DEFAULT_CERC_DENY_MULTIADDRS}}"
|
||||||
CERC_PUBSUB="${CERC_PUBSUB:-${DEFAULT_CERC_PUBSUB}}"
|
|
||||||
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}}"
|
||||||
@@ -51,7 +50,6 @@ 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_DENY_MULTIADDRS|${CERC_DENY_MULTIADDRS}|g; \
|
||||||
s/REPLACE_WITH_CERC_PUBSUB/${CERC_PUBSUB}/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; \
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
denyMultiaddrs = REPLACE_WITH_CERC_DENY_MULTIADDRS
|
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'
|
||||||
pubsub = 'REPLACE_WITH_CERC_PUBSUB'
|
|
||||||
enableDebugInfo = true
|
enableDebugInfo = true
|
||||||
|
|
||||||
[server.p2p.peer]
|
[server.p2p.peer]
|
||||||
@@ -38,7 +37,6 @@
|
|||||||
pubSubTopic = 'mobymask'
|
pubSubTopic = 'mobymask'
|
||||||
denyMultiaddrs = REPLACE_WITH_CERC_DENY_MULTIADDRS
|
denyMultiaddrs = REPLACE_WITH_CERC_DENY_MULTIADDRS
|
||||||
peerIdFile = './peers/peer-id.json'
|
peerIdFile = './peers/peer-id.json'
|
||||||
pubsub = 'REPLACE_WITH_CERC_PUBSUB'
|
|
||||||
enableDebugInfo = true
|
enableDebugInfo = true
|
||||||
enableL2Txs = REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS
|
enableL2Txs = REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS
|
||||||
|
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
CERC_NA_ADDRESS="${CERC_NA_ADDRESS:-${DEFAULT_CERC_NA_ADDRESS}}"
|
|
||||||
CERC_VPA_ADDRESS="${CERC_VPA_ADDRESS:-${DEFAULT_CERC_VPA_ADDRESS}}"
|
|
||||||
CERC_CA_ADDRESS="${CERC_CA_ADDRESS:-${DEFAULT_CERC_CA_ADDRESS}}"
|
|
||||||
|
|
||||||
NITRO_ADDRESSES_FILE_PATH="/nitro/nitro-addresses.json"
|
|
||||||
|
|
||||||
# Check if CERC_NA_ADDRESS environment variable set to skip contract deployment
|
|
||||||
if [ -n "$CERC_NA_ADDRESS" ]; then
|
|
||||||
echo "CERC_NA_ADDRESS is set to '$CERC_NA_ADDRESS'"
|
|
||||||
echo "CERC_VPA_ADDRESS is set to '$CERC_VPA_ADDRESS'"
|
|
||||||
echo "CERC_CA_ADDRESS is set to '$CERC_CA_ADDRESS'"
|
|
||||||
echo "Using the above addresses and skipping Nitro contracts deployment"
|
|
||||||
|
|
||||||
# Create the required JSON and write it to a file
|
|
||||||
nitro_addresses_json=$(jq -n \
|
|
||||||
--arg na "$CERC_NA_ADDRESS" \
|
|
||||||
--arg vpa "$CERC_VPA_ADDRESS" \
|
|
||||||
--arg ca "$CERC_CA_ADDRESS" \
|
|
||||||
'.nitroAdjudicatorAddress = $na | .virtualPaymentAppAddress = $vpa | .consensusAppAddress = $ca')
|
|
||||||
echo "$nitro_addresses_json" > "${NITRO_ADDRESSES_FILE_PATH}"
|
|
||||||
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check and exit if a deployment already exists (on restarts)
|
|
||||||
if [ -f ${NITRO_ADDRESSES_FILE_PATH} ]; then
|
|
||||||
echo "${NITRO_ADDRESSES_FILE_PATH} already exists, skipping Nitro contracts deployment"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Using L2 RPC endpoint ${CERC_L2_GETH_RPC}"
|
|
||||||
|
|
||||||
if [ -n "$CERC_L1_ACCOUNTS_CSV_URL" ] && \
|
|
||||||
l1_accounts_response=$(curl -L --write-out '%{http_code}' --silent --output /dev/null "$CERC_L1_ACCOUNTS_CSV_URL") && \
|
|
||||||
[ "$l1_accounts_response" -eq 200 ];
|
|
||||||
then
|
|
||||||
echo "Fetching L1 account credentials using provided URL"
|
|
||||||
mkdir -p /geth-accounts
|
|
||||||
wget -O /geth-accounts/accounts.csv "$CERC_L1_ACCOUNTS_CSV_URL"
|
|
||||||
|
|
||||||
# Read the private key of an L1 account to deploy contract
|
|
||||||
CERC_PRIVATE_KEY_DEPLOYER=$(head -n 1 /geth-accounts/accounts.csv | cut -d ',' -f 3)
|
|
||||||
else
|
|
||||||
echo "Couldn't fetch L1 account credentials, using CERC_PRIVATE_KEY_DEPLOYER from env"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "RPC_URL=${CERC_L2_GETH_RPC}" > .env
|
|
||||||
echo "NITRO_ADDRESSES_FILE_PATH=${NITRO_ADDRESSES_FILE_PATH}" >> .env
|
|
||||||
echo "PRIVATE_KEY=${CERC_PRIVATE_KEY_DEPLOYER}" >> .env
|
|
||||||
|
|
||||||
yarn ts-node --esm deploy-nitro-contracts.ts
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
import 'dotenv/config';
|
|
||||||
import fs from 'fs';
|
|
||||||
import { providers, Wallet } from 'ethers';
|
|
||||||
import { deployContracts } from '@cerc-io/nitro-util';
|
|
||||||
|
|
||||||
async function main () {
|
|
||||||
const rpcURL = process.env.RPC_URL;
|
|
||||||
const addressesFilePath = process.env.NITRO_ADDRESSES_FILE_PATH;
|
|
||||||
const deployerKey = process.env.PRIVATE_KEY;
|
|
||||||
|
|
||||||
if (!rpcURL) {
|
|
||||||
console.log('RPC_URL not set, skipping deployment');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!addressesFilePath) {
|
|
||||||
console.log('NITRO_ADDRESSES_FILE_PATH not set, skipping deployment');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!deployerKey) {
|
|
||||||
console.log('PRIVATE_KEY not set, skipping deployment');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const provider = new providers.JsonRpcProvider(process.env.RPC_URL);
|
|
||||||
const signer = new Wallet(deployerKey, provider);
|
|
||||||
|
|
||||||
const [
|
|
||||||
nitroAdjudicatorAddress,
|
|
||||||
virtualPaymentAppAddress,
|
|
||||||
consensusAppAddress
|
|
||||||
] = await deployContracts(signer as any);
|
|
||||||
|
|
||||||
const output = {
|
|
||||||
nitroAdjudicatorAddress,
|
|
||||||
virtualPaymentAppAddress,
|
|
||||||
consensusAppAddress
|
|
||||||
};
|
|
||||||
|
|
||||||
fs.writeFileSync(addressesFilePath, JSON.stringify(output, null, 2));
|
|
||||||
console.log('Nitro contracts deployed, addresses written to', addressesFilePath);
|
|
||||||
console.log('Result:', JSON.stringify(output, null, 2));
|
|
||||||
}
|
|
||||||
|
|
||||||
main()
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
});
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user