Compare commits

..
Author SHA1 Message Date
dboreham 6396e43c68 Update for demo
Former-commit-id: 5fed0cdacace4eb7c490dd9df9a53ffc166ff4ad
2023-04-10 14:52:23 -06:00
dboreham 6cb7bbf1d0 Remove test file
Former-commit-id: 0b6578a182
2023-04-10 11:46:52 -06:00
dboreham acbadc83fc Workaround for ref being different in production
Former-commit-id: f5c2e28065
2023-04-10 11:43:04 -06:00
dboreham 728bf653cc Merge branch 'main' into publish-test
Former-commit-id: 9a657e05a1
2023-04-10 11:29:29 -06:00
dboreham a5b5054af5 Merge branch 'main' into publish-test
Former-commit-id: b2070dfaa9
2023-04-10 11:20:33 -06:00
dboreham 3cdad5b2d6 Merge main
Former-commit-id: 4d1f339188
2023-04-10 09:20:26 -06:00
dboreham bb33cdffec Force build
Former-commit-id: df37e03287
2023-04-10 07:41:02 -06:00
dboreham 79891b9128 Merge master
Former-commit-id: 00b7ddf1f0
2023-04-10 07:40:13 -06:00
dboreham 1abde44a31 Try quotes
Former-commit-id: 008f42ad38
2023-04-10 07:35:55 -06:00
dboreham 19eb67ed08 Force build
Former-commit-id: 32198aba12
2023-04-10 07:29:34 -06:00
dboreham c69ce45190 Merge branch 'main' into publish-test
Former-commit-id: 9a5fa577f2
2023-04-10 07:28:18 -06:00
dboreham 9cd3ac2567 Force build
Former-commit-id: 77d5c8e9ea
2023-04-10 07:20:51 -06:00
dboreham 0c1170e51c Merge branch 'publish-test' of github.com:cerc-io/stack-orchestrator into publish-test
Former-commit-id: c5a42b7ddf
2023-04-10 07:10:36 -06:00
dboreham 3b9fe60e59 Add file to force a job
Former-commit-id: d01b2215c4
2023-04-10 07:09:56 -06:00
dboreham 6bd84e5b2f Add test code
Former-commit-id: 355c3e179e
2023-04-10 07:02:05 -06:00
92 changed files with 227 additions and 737 deletions
+1
View File
@@ -44,3 +44,4 @@ jobs:
# Hack using endsWith to workaround Gitea sometimes sending "publish-test" vs "refs/heads/publish-test" # Hack using endsWith to workaround Gitea sometimes sending "publish-test" vs "refs/heads/publish-test"
draft: ${{ endsWith('publish-test', github.ref ) }} draft: ${{ endsWith('publish-test', github.ref ) }}
files: ./laconic-so files: ./laconic-so
-2
View File
@@ -21,8 +21,6 @@ jobs:
run: python3 --version run: python3 --version
- name: "Install shiv" - name: "Install shiv"
run: pip install shiv run: pip install shiv
- name: "Generate build version file"
run: ./scripts/create_build_tag_file.sh
- name: "Build local shiv package" - name: "Build local shiv package"
run: ./scripts/build_shiv_package.sh run: ./scripts/build_shiv_package.sh
- name: "Run smoke tests" - name: "Run smoke tests"
-46
View File
@@ -1,46 +0,0 @@
name: Publish
on:
push:
branches:
- main
- publish-test
jobs:
publish:
name: "Build and publish"
runs-on: ubuntu-latest
steps:
- name: "Clone project repository"
uses: actions/checkout@v3
- name: "Get build info"
id: build-info
run: |
build_tag=$(./scripts/create_build_tag_file.sh)
echo "build-tag=v${build_tag}" >> $GITHUB_OUTPUT
- 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: "Build local shiv package"
id: build
run: |
./scripts/build_shiv_package.sh
result_code=$?
echo "package-file=$(ls ./package/*)" >> $GITHUB_OUTPUT
exit $result_code
- name: "Stage artifact file"
run: |
cp ${{ steps.build.outputs.package-file }} ./laconic-so
- name: "Create release"
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.build-info.outputs.build-tag }}
# On the publish test branch, mark our release as a draft
# Hack using endsWith to workaround Gitea sometimes sending "publish-test" vs "refs/heads/publish-test"
draft: ${{ endsWith('publish-test', github.ref ) }}
files: ./laconic-so
-29
View File
@@ -1,29 +0,0 @@
name: 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 smoke tests"
run: ./tests/smoke-test/run-smoke-test.sh
+1 -1
View File
@@ -5,4 +5,4 @@ laconic-so
laconic_stack_orchestrator.egg-info laconic_stack_orchestrator.egg-info
__pycache__ __pycache__
*~ *~
build
-1
View File
@@ -96,4 +96,3 @@ See the [CONTRIBUTING.md](/docs/CONTRIBUTING.md) for developer mode install.
Native aarm64 is _not_ currently supported. x64 emulation on ARM64 macos should work (not yet tested). Native aarm64 is _not_ currently supported. x64 emulation on ARM64 macos should work (not yet tested).
+2 -9
View File
@@ -36,16 +36,13 @@ from .util import include_exclude_check, get_parsed_stack_config
@click.command() @click.command()
@click.option('--include', help="only build these containers") @click.option('--include', help="only build these containers")
@click.option('--exclude', help="don\'t build these containers") @click.option('--exclude', help="don\'t build these containers")
@click.option("--force-rebuild", is_flag=True, default=False, help="Override dependency checking -- always rebuild")
@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):
'''build the set of containers required for a complete stack''' '''build the set of containers required for a complete stack'''
quiet = ctx.obj.quiet quiet = ctx.obj.quiet
verbose = ctx.obj.verbose verbose = ctx.obj.verbose
dry_run = ctx.obj.dry_run dry_run = ctx.obj.dry_run
debug = ctx.obj.debug
local_stack = ctx.obj.local_stack local_stack = ctx.obj.local_stack
stack = ctx.obj.stack stack = ctx.obj.stack
continue_on_error = ctx.obj.continue_on_error continue_on_error = ctx.obj.continue_on_error
@@ -84,17 +81,13 @@ 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": config("CERC_NPM_REGISTRY_URL", default="http://gitea.local:3000/api/packages/cerc-io/npm/"), "CERC_NPM_URL": "http://gitea.local:3000/api/packages/cerc-io/npm/",
"CERC_NPM_AUTH_TOKEN": config("CERC_NPM_AUTH_TOKEN", default="<token-not-supplied>"), "CERC_NPM_AUTH_TOKEN": config("CERC_NPM_AUTH_TOKEN", default="<token-not-supplied>"),
"CERC_REPO_BASE_DIR": dev_root_path, "CERC_REPO_BASE_DIR": dev_root_path,
"CERC_CONTAINER_BASE_DIR": container_build_dir,
"CERC_HOST_UID": f"{os.getuid()}", "CERC_HOST_UID": f"{os.getuid()}",
"CERC_HOST_GID": f"{os.getgid()}", "CERC_HOST_GID": f"{os.getgid()}",
"DOCKER_BUILDKIT": "0" "DOCKER_BUILDKIT": "0"
} }
container_build_env.update({"CERC_SCRIPT_DEBUG": "true"} if debug else {})
container_build_env.update({"CERC_FORCE_REBUILD": "true"} if force_rebuild else {})
container_build_env.update({"CERC_CONTAINER_EXTRA_BUILD_ARGS": extra_build_args} if extra_build_args else {})
def process_container(container): def process_container(container):
if not quiet: if not quiet:
+2 -8
View File
@@ -33,10 +33,8 @@ 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, help="Override existing target package version check -- force rebuild")
@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):
'''build the set of npm packages required for a complete stack''' '''build the set of npm packages required for a complete stack'''
quiet = ctx.obj.quiet quiet = ctx.obj.quiet
@@ -121,12 +119,8 @@ def command(ctx, include, exclude, force_rebuild, extra_build_args):
# Originally we used the PEP 584 merge operator: # Originally we used the PEP 584 merge operator:
# 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
}
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_CONTAINER_EXTRA_BUILD_ARGS": extra_build_args} if extra_build_args else {})
try: try:
docker.run(builder_js_image_name, docker.run(builder_js_image_name,
remove=True, remove=True,
@@ -8,7 +8,6 @@ services:
# TODO: look at folding these scripts into the container # TODO: look at folding these scripts into the container
- ../config/fixturenet-laconicd/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh - ../config/fixturenet-laconicd/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
- ../config/fixturenet-laconicd/export-mykey.sh:/docker-entrypoint-scripts.d/export-mykey.sh - ../config/fixturenet-laconicd/export-mykey.sh:/docker-entrypoint-scripts.d/export-mykey.sh
- ../config/fixturenet-laconicd/export-myaddress.sh:/docker-entrypoint-scripts.d/export-myaddress.sh
# TODO: determine which of the ports below is really needed # TODO: determine which of the ports below is really needed
ports: ports:
- "6060" - "6060"
@@ -9,17 +9,9 @@ services:
image: cerc/optimism-contracts:local image: cerc/optimism-contracts:local
env_file: env_file:
- ../config/fixturenet-optimism/l1-params.env - ../config/fixturenet-optimism/l1-params.env
environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_L1_CHAIN_ID: ${CERC_L1_CHAIN_ID}
CERC_L1_RPC: ${CERC_L1_RPC}
CERC_L1_ADDRESS: ${CERC_L1_ADDRESS}
CERC_L1_PRIV_KEY: ${CERC_L1_PRIV_KEY}
CERC_L1_ADDRESS_2: ${CERC_L1_ADDRESS_2}
CERC_L1_PRIV_KEY_2: ${CERC_L1_PRIV_KEY_2}
# Waits for L1 endpoint to be up before running the script # Waits for L1 endpoint to be up before running the script
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 $${L1_HOST} -p $${L1_PORT} -s -t 60 -- ./run.sh"
volumes: volumes:
- ../config/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
- ../container-build/cerc-optimism-contracts/hardhat-tasks/verify-contract-deployment.ts:/app/packages/contracts-bedrock/tasks/verify-contract-deployment.ts - ../container-build/cerc-optimism-contracts/hardhat-tasks/verify-contract-deployment.ts:/app/packages/contracts-bedrock/tasks/verify-contract-deployment.ts
@@ -41,9 +33,6 @@ services:
condition: service_completed_successfully condition: service_completed_successfully
env_file: env_file:
- ../config/fixturenet-optimism/l1-params.env - ../config/fixturenet-optimism/l1-params.env
environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_L1_RPC: ${CERC_L1_RPC}
volumes: volumes:
- ../config/fixturenet-optimism/generate-l2-config.sh:/app/generate-l2-config.sh - ../config/fixturenet-optimism/generate-l2-config.sh:/app/generate-l2-config.sh
- l1_deployment:/contracts-bedrock:ro - l1_deployment:/contracts-bedrock:ro
@@ -76,15 +65,12 @@ services:
# Runs the L2 consensus client (Sequencer node) # Runs the L2 consensus client (Sequencer node)
op-node: op-node:
image: cerc/optimism-op-node:local env_file:
- ../config/fixturenet-optimism/l1-params.env
depends_on: depends_on:
op-geth: op-geth:
condition: service_healthy condition: service_healthy
env_file: image: cerc/optimism-op-node:local
- ../config/fixturenet-optimism/l1-params.env
environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_L1_RPC: ${CERC_L1_RPC}
volumes: volumes:
- ../config/fixturenet-optimism/run-op-node.sh:/app/run-op-node.sh - ../config/fixturenet-optimism/run-op-node.sh:/app/run-op-node.sh
- l2_config:/op-node-data:ro - l2_config:/op-node-data:ro
@@ -103,17 +89,14 @@ services:
# Runs the batcher (takes transactions from the Sequencer and publishes them to L1) # Runs the batcher (takes transactions from the Sequencer and publishes them to L1)
op-batcher: op-batcher:
image: cerc/optimism-op-batcher:local env_file:
- ../config/fixturenet-optimism/l1-params.env
depends_on: depends_on:
op-node: op-node:
condition: service_healthy condition: service_healthy
op-geth: op-geth:
condition: service_healthy condition: service_healthy
env_file: image: cerc/optimism-op-batcher:local
- ../config/fixturenet-optimism/l1-params.env
environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_L1_RPC: ${CERC_L1_RPC}
volumes: volumes:
- ../config/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
@@ -121,7 +104,7 @@ services:
entrypoint: ["sh", "-c"] entrypoint: ["sh", "-c"]
# Waits for L1 endpoint to be up before running the batcher # Waits for L1 endpoint to be up before running the batcher
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-op-batcher.sh" "/wait-for-it.sh -h $${L1_HOST} -p $${L1_PORT} -s -t 60 -- /run-op-batcher.sh"
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
@@ -6,23 +6,16 @@ services:
image: cerc/mobymask-ui:local image: cerc/mobymask-ui:local
env_file: env_file:
- ../config/watcher-mobymask-v2/mobymask-params.env - ../config/watcher-mobymask-v2/mobymask-params.env
environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_CHAIN_ID: ${CERC_CHAIN_ID}
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
CERC_APP_WATCHER_URL: ${CERC_APP_WATCHER_URL}
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
# Waits for watcher server to be up before app build # Waits for watcher server to be up before app build
# Required when running with watcher stack to get deployed contract address # Required when running with watcher stack to get deployed contract address
command: command:
- sh - sh
- -c - -c
- ./wait-for-it.sh -h ${CERC_WATCHER_HOST:-$${DEFAULT_CERC_WATCHER_HOST}} -p ${CERC_WATCHER_PORT:-$${DEFAULT_CERC_WATCHER_PORT}} -s -t 0 -- ./mobymask-app-start.sh - ./wait-for-it.sh -h $${WATCHER_HOST} -p $${WATCHER_PORT} -s -t 0 -- ./mobymask-app-start.sh
volumes: volumes:
- ../config/wait-for-it.sh:/app/wait-for-it.sh - ../config/wait-for-it.sh:/app/wait-for-it.sh
- ../config/watcher-mobymask-v2/mobymask-app-config.json:/app/src/mobymask-app-config.json - ../config/watcher-mobymask-v2/mobymask-app-config.json:/app/src/mobymask-app-config.json
- ../config/watcher-mobymask-v2/mobymask-app-start.sh:/app/mobymask-app-start.sh - ../config/watcher-mobymask-v2/mobymask-app-start.sh:/app/mobymask-app-start.sh
- peers_ids:/peers
- mobymask_deployment:/server - mobymask_deployment:/server
ports: ports:
- "0.0.0.0:3002:3000" - "0.0.0.0:3002:3000"
@@ -33,9 +26,6 @@ services:
retries: 15 retries: 15
start_period: 10s start_period: 10s
shm_size: '1GB' shm_size: '1GB'
extra_hosts:
- "host.docker.internal:host-gateway"
volumes: volumes:
mobymask_deployment: mobymask_deployment:
peers_ids:
@@ -7,14 +7,10 @@ services:
working_dir: /app/packages/test-app working_dir: /app/packages/test-app
env_file: env_file:
- ../config/watcher-mobymask-v2/mobymask-params.env - ../config/watcher-mobymask-v2/mobymask-params.env
environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_RELAY_NODES: ${CERC_RELAY_NODES}
command: ["sh", "./test-app-start.sh"] command: ["sh", "./test-app-start.sh"]
volumes: volumes:
- ../config/watcher-mobymask-v2/test-app-config.json:/app/packages/test-app/src/test-app-config.json - ../config/watcher-mobymask-v2/test-app-config.json:/app/packages/test-app/src/test-app-config.json
- ../config/watcher-mobymask-v2/test-app-start.sh:/app/packages/test-app/test-app-start.sh - ../config/watcher-mobymask-v2/test-app-start.sh:/app/packages/test-app/test-app-start.sh
- peers_ids:/peers
ports: ports:
- "0.0.0.0:3003:3000" - "0.0.0.0:3003:3000"
healthcheck: healthcheck:
@@ -23,8 +19,3 @@ services:
timeout: 5s timeout: 5s
retries: 15 retries: 15
start_period: 10s start_period: 10s
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
peers_ids:
@@ -22,8 +22,8 @@ services:
retries: 15 retries: 15
start_period: 10s start_period: 10s
# Deploys the MobyMask contract and generates an invite link # Deploys MobyMask contract and generates an invite link
# Deployment is skipped if CERC_DEPLOYED_CONTRACT env is set # Deployment is skipped if DEPLOYED_CONTRACT env is already set
mobymask: mobymask:
image: cerc/mobymask:local image: cerc/mobymask:local
working_dir: /app/packages/server working_dir: /app/packages/server
@@ -31,19 +31,14 @@ services:
- ../config/watcher-mobymask-v2/optimism-params.env - ../config/watcher-mobymask-v2/optimism-params.env
- ../config/watcher-mobymask-v2/mobymask-params.env - ../config/watcher-mobymask-v2/mobymask-params.env
environment: environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} - ENV=PROD
ENV: "PROD"
CERC_L2_GETH_RPC: ${CERC_L2_GETH_RPC}
CERC_PRIVATE_KEY_DEPLOYER: ${CERC_PRIVATE_KEY_DEPLOYER}
CERC_MOBYMASK_APP_BASE_URI: ${CERC_MOBYMASK_APP_BASE_URI}
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
# Waits for L2 Optimism Geth and Node servers to be up before deploying contract # Waits for L2 Optimism Geth and Node servers to be up before deploying contract
command: command:
- sh - sh
- -c - -c
- | - |
./wait-for-it.sh -h ${CERC_L2_GETH_HOST:-$${DEFAULT_CERC_L2_GETH_HOST}} -p ${CERC_L2_GETH_PORT:-$${DEFAULT_CERC_L2_GETH_PORT}} -s -t 0 && \ ./wait-for-it.sh -h $${L2_GETH_HOST} -p $${L2_GETH_PORT} -s -t 0 && \
./wait-for-it.sh -h ${CERC_L2_NODE_HOST:-$${DEFAULT_CERC_L2_NODE_HOST}} -p ${CERC_L2_NODE_PORT:-$${DEFAULT_CERC_L2_NODE_PORT}} -s -t 0 && \ ./wait-for-it.sh -h $${L2_NODE_HOST} -p $${L2_NODE_PORT} -s -t 0 && \
./deploy-and-generate-invite.sh ./deploy-and-generate-invite.sh
volumes: volumes:
- ../config/wait-for-it.sh:/app/packages/server/wait-for-it.sh - ../config/wait-for-it.sh:/app/packages/server/wait-for-it.sh
@@ -56,29 +51,23 @@ services:
# Starts the mobymask-v2-watcher server # Starts the mobymask-v2-watcher server
mobymask-watcher-server: mobymask-watcher-server:
image: cerc/watcher-mobymask-v2:local
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
mobymask-watcher-db: mobymask-watcher-db:
condition: service_healthy condition: service_healthy
mobymask: mobymask:
condition: service_completed_successfully condition: service_completed_successfully
image: cerc/watcher-mobymask-v2:local
env_file: env_file:
- ../config/watcher-mobymask-v2/optimism-params.env - ../config/watcher-mobymask-v2/optimism-params.env
- ../config/watcher-mobymask-v2/mobymask-params.env - ../config/watcher-mobymask-v2/mobymask-params.env
environment:
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
CERC_L2_GETH_RPC: ${CERC_L2_GETH_RPC}
CERC_PRIVATE_KEY_PEER: ${CERC_PRIVATE_KEY_PEER}
CERC_RELAY_PEERS: ${CERC_RELAY_PEERS}
CERC_RELAY_ANNOUNCE_DOMAIN: ${CERC_RELAY_ANNOUNCE_DOMAIN}
CERC_ENABLE_PEER_L2_TXS: ${CERC_ENABLE_PEER_L2_TXS}
CERC_DEPLOYED_CONTRACT: ${CERC_DEPLOYED_CONTRACT}
command: ["sh", "start-server.sh"] command: ["sh", "start-server.sh"]
volumes: volumes:
- ../config/watcher-mobymask-v2/watcher-config-template.toml:/app/packages/mobymask-v2-watcher/environments/watcher-config-template.toml - ../config/watcher-mobymask-v2/watcher-config-template.toml:/app/packages/mobymask-v2-watcher/environments/watcher-config-template.toml
- ../config/watcher-mobymask-v2/peer.env:/app/packages/peer/.env
- ../config/watcher-mobymask-v2/relay-id.json:/app/packages/mobymask-v2-watcher/relay-id.json
- ../config/watcher-mobymask-v2/peer-id.json:/app/packages/mobymask-v2-watcher/peer-id.json
- ../config/watcher-mobymask-v2/start-server.sh:/app/packages/mobymask-v2-watcher/start-server.sh - ../config/watcher-mobymask-v2/start-server.sh:/app/packages/mobymask-v2-watcher/start-server.sh
- peers_ids:/app/packages/mobymask-v2-watcher/peers
- mobymask_deployment:/server - mobymask_deployment:/server
- fixturenet_geth_accounts:/geth-accounts:ro - fixturenet_geth_accounts:/geth-accounts:ro
# Expose GQL, metrics and relay node ports # Expose GQL, metrics and relay node ports
@@ -97,6 +86,5 @@ services:
volumes: volumes:
mobymask_watcher_db_data: mobymask_watcher_db_data:
peers_ids:
mobymask_deployment: mobymask_deployment:
fixturenet_geth_accounts: fixturenet_geth_accounts:
@@ -1,2 +0,0 @@
#!/bin/sh
laconicd keys show mykey | grep address | cut -d ' ' -f 3
@@ -5,5 +5,3 @@ services:
userKey: REPLACE_WITH_MYKEY userKey: REPLACE_WITH_MYKEY
bondId: bondId:
chainId: laconic_9000-1 chainId: laconic_9000-1
gas: 250000
fees: 200000aphoton
@@ -4,8 +4,6 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}"
# Check existing config if it exists # Check existing config if it exists
if [ -f /app/jwt.txt ] && [ -f /app/rollup.json ]; then if [ -f /app/jwt.txt ] && [ -f /app/rollup.json ]; then
echo "Found existing L2 config, cross-checking with L1 deployment config" echo "Found existing L2 config, cross-checking with L1 deployment config"
@@ -32,6 +30,6 @@ op-node genesis l2 \
--deployment-dir /contracts-bedrock/deployments/getting-started/ \ --deployment-dir /contracts-bedrock/deployments/getting-started/ \
--outfile.l2 /app/genesis.json \ --outfile.l2 /app/genesis.json \
--outfile.rollup /app/rollup.json \ --outfile.rollup /app/rollup.json \
--l1-rpc $CERC_L1_RPC --l1-rpc $L1_RPC
openssl rand -hex 32 > /app/jwt.txt openssl rand -hex 32 > /app/jwt.txt
@@ -1,14 +1,14 @@
# Defaults # Change if pointing to an external L1 endpoint
# L1 endpoint # L1 endpoint
DEFAULT_CERC_L1_CHAIN_ID=1212 L1_CHAIN_ID=1212
DEFAULT_CERC_L1_RPC="http://fixturenet-eth-geth-1:8545" L1_RPC="http://fixturenet-eth-geth-1:8545"
DEFAULT_CERC_L1_HOST="fixturenet-eth-geth-1" L1_HOST="fixturenet-eth-geth-1"
DEFAULT_CERC_L1_PORT=8545 L1_PORT=8545
# Credentials for accounts on L1 to send balance to Optimism Proxy contract from # Credentials for accounts on L1 to send balance to Optimism Proxy contract from
# (enables them to do transactions on L2) # (enables them to do transactions on L2)
DEFAULT_CERC_L1_ADDRESS= L1_ADDRESS=
DEFAULT_CERC_L1_PRIV_KEY= L1_PRIV_KEY=
DEFAULT_CERC_L1_ADDRESS_2= L1_ADDRESS_2=
DEFAULT_CERC_L1_PRIV_KEY_2= L1_PRIV_KEY_2=
@@ -4,15 +4,7 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
CERC_L1_CHAIN_ID="${CERC_L1_CHAIN_ID:-${DEFAULT_CERC_L1_CHAIN_ID}}" echo "Using L1 RPC endpoint ${L1_RPC}"
CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}"
CERC_L1_ADDRESS="${CERC_L1_ADDRESS:-${DEFAULT_CERC_L1_ADDRESS}}"
CERC_L1_PRIV_KEY="${CERC_L1_PRIV_KEY:-${DEFAULT_CERC_L1_PRIV_KEY}}"
CERC_L1_ADDRESS_2="${CERC_L1_ADDRESS_2:-${DEFAULT_CERC_L1_ADDRESS_2}}"
CERC_L1_PRIV_KEY_2="${CERC_L1_PRIV_KEY_2:-${DEFAULT_CERC_L1_PRIV_KEY_2}}"
echo "Using L1 RPC endpoint ${CERC_L1_RPC}"
IMPORT_1="import './verify-contract-deployment'" IMPORT_1="import './verify-contract-deployment'"
IMPORT_2="import './rekey-json'" IMPORT_2="import './rekey-json'"
@@ -26,7 +18,7 @@ if ! grep -Fxq "$IMPORT_1" tasks/index.ts; then
fi fi
# Update the chainId in the hardhat config # Update the chainId in the hardhat config
sed -i "/getting-started/ {n; s/.*chainId.*/ chainId: $CERC_L1_CHAIN_ID,/}" hardhat.config.ts sed -i "/getting-started/ {n; s/.*chainId.*/ chainId: $L1_CHAIN_ID,/}" hardhat.config.ts
# Exit if a deployment already exists (on restarts) # Exit if a deployment already exists (on restarts)
# Note: fixturenet-eth-geth currently starts fresh on a restart # Note: fixturenet-eth-geth currently starts fresh on a restart
@@ -65,16 +57,16 @@ SEQUENCER_ADDRESS=$(echo "$KEYS_JSON" | jq -r '.Sequencer.address')
# Read the private key of L1 accounts # Read the private key of L1 accounts
if [ -f /geth-accounts/accounts.csv ]; then if [ -f /geth-accounts/accounts.csv ]; then
echo "Using L1 account credentials from the mounted volume" echo "Using L1 account credentials from the mounted volume"
CERC_L1_ADDRESS=$(head -n 1 /geth-accounts/accounts.csv | cut -d ',' -f 2) L1_ADDRESS=$(head -n 1 /geth-accounts/accounts.csv | cut -d ',' -f 2)
CERC_L1_PRIV_KEY=$(head -n 1 /geth-accounts/accounts.csv | cut -d ',' -f 3) L1_PRIV_KEY=$(head -n 1 /geth-accounts/accounts.csv | cut -d ',' -f 3)
CERC_L1_ADDRESS_2=$(awk -F, 'NR==2{print $(NF-1)}' /geth-accounts/accounts.csv) L1_ADDRESS_2=$(awk -F, 'NR==2{print $(NF-1)}' /geth-accounts/accounts.csv)
CERC_L1_PRIV_KEY_2=$(awk -F, 'NR==2{print $NF}' /geth-accounts/accounts.csv) L1_PRIV_KEY_2=$(awk -F, 'NR==2{print $NF}' /geth-accounts/accounts.csv)
else else
echo "Using L1 account credentials from env" echo "Using L1 account credentials from env"
fi fi
# Select a finalized L1 block as the starting point for roll ups # Select a finalized L1 block as the starting point for roll ups
until FINALIZED_BLOCK=$(cast block finalized --rpc-url "$CERC_L1_RPC"); do until FINALIZED_BLOCK=$(cast block finalized --rpc-url "$L1_RPC"); do
echo "Waiting for a finalized L1 block to exist, retrying after 10s" echo "Waiting for a finalized L1 block to exist, retrying after 10s"
sleep 10 sleep 10
done done
@@ -86,22 +78,22 @@ L1_BLOCKTIMESTAMP=$(echo "$FINALIZED_BLOCK" | awk '/timestamp/{print $2}')
echo "Selected L1 block ${L1_BLOCKNUMBER} as the starting block for roll ups" echo "Selected L1 block ${L1_BLOCKNUMBER} as the starting block for roll ups"
# Send balances to the above L2 addresses # Send balances to the above L2 addresses
yarn hardhat send-balance --to "${ADMIN_ADDRESS}" --amount 2 --private-key "${CERC_L1_PRIV_KEY}" --network getting-started yarn hardhat send-balance --to "${ADMIN_ADDRESS}" --amount 2 --private-key "${L1_PRIV_KEY}" --network getting-started
yarn hardhat send-balance --to "${PROPOSER_ADDRESS}" --amount 5 --private-key "${CERC_L1_PRIV_KEY}" --network getting-started yarn hardhat send-balance --to "${PROPOSER_ADDRESS}" --amount 5 --private-key "${L1_PRIV_KEY}" --network getting-started
yarn hardhat send-balance --to "${BATCHER_ADDRESS}" --amount 1000 --private-key "${CERC_L1_PRIV_KEY}" --network getting-started yarn hardhat send-balance --to "${BATCHER_ADDRESS}" --amount 1000 --private-key "${L1_PRIV_KEY}" --network getting-started
echo "Balances sent to L2 accounts" echo "Balances sent to L2 accounts"
# Update the deployment config # Update the deployment config
sed -i 's/"l2OutputOracleStartingTimestamp": TIMESTAMP/"l2OutputOracleStartingTimestamp": '"$L1_BLOCKTIMESTAMP"'/g' deploy-config/getting-started.json sed -i 's/"l2OutputOracleStartingTimestamp": TIMESTAMP/"l2OutputOracleStartingTimestamp": '"$L1_BLOCKTIMESTAMP"'/g' deploy-config/getting-started.json
jq --arg chainid "$CERC_L1_CHAIN_ID" '.l1ChainID = ($chainid | tonumber)' deploy-config/getting-started.json > tmp.json && mv tmp.json deploy-config/getting-started.json jq --arg chainid "$L1_CHAIN_ID" '.l1ChainID = ($chainid | tonumber)' deploy-config/getting-started.json > tmp.json && mv tmp.json deploy-config/getting-started.json
node update-config.js deploy-config/getting-started.json "$ADMIN_ADDRESS" "$PROPOSER_ADDRESS" "$BATCHER_ADDRESS" "$SEQUENCER_ADDRESS" "$L1_BLOCKHASH" node update-config.js deploy-config/getting-started.json "$ADMIN_ADDRESS" "$PROPOSER_ADDRESS" "$BATCHER_ADDRESS" "$SEQUENCER_ADDRESS" "$L1_BLOCKHASH"
echo "Updated the deployment config" echo "Updated the deployment config"
# Create a .env file # Create a .env file
echo "L1_RPC=$CERC_L1_RPC" > .env echo "L1_RPC=$L1_RPC" > .env
echo "PRIVATE_KEY_DEPLOYER=$ADMIN_PRIV_KEY" >> .env echo "PRIVATE_KEY_DEPLOYER=$ADMIN_PRIV_KEY" >> .env
echo "Deploying the L1 smart contracts, this will take a while..." echo "Deploying the L1 smart contracts, this will take a while..."
@@ -117,12 +109,12 @@ PROXY_ADDRESS=$(echo "$PROXY_JSON" | jq -r '.address')
# Send balance to the above Proxy contract in L1 for reflecting balance in L2 # Send balance to the above Proxy contract in L1 for reflecting balance in L2
# First account # First account
yarn hardhat send-balance --to "${PROXY_ADDRESS}" --amount 1 --private-key "${CERC_L1_PRIV_KEY}" --network getting-started yarn hardhat send-balance --to "${PROXY_ADDRESS}" --amount 1 --private-key "${L1_PRIV_KEY}" --network getting-started
# Second account # Second account
yarn hardhat send-balance --to "${PROXY_ADDRESS}" --amount 1 --private-key "${CERC_L1_PRIV_KEY_2}" --network getting-started yarn hardhat send-balance --to "${PROXY_ADDRESS}" --amount 1 --private-key "${L1_PRIV_KEY_2}" --network getting-started
echo "Balance sent to Proxy L2 contract" echo "Balance sent to Proxy L2 contract"
echo "Use following accounts for transactions in L2:" echo "Use following accounts for transactions in L2:"
echo "${CERC_L1_ADDRESS}" echo "${L1_ADDRESS}"
echo "${CERC_L1_ADDRESS_2}" echo "${L1_ADDRESS_2}"
echo "Done" echo "Done"
@@ -4,8 +4,6 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}"
# Get BACTHER_KEY from keys.json # Get BACTHER_KEY from keys.json
BATCHER_KEY=$(jq -r '.Batcher.privateKey' /l2-accounts/keys.json | tr -d '"') BATCHER_KEY=$(jq -r '.Batcher.privateKey' /l2-accounts/keys.json | tr -d '"')
@@ -22,5 +20,5 @@ op-batcher \
--rpc.enable-admin \ --rpc.enable-admin \
--max-channel-duration=1 \ --max-channel-duration=1 \
--target-l1-tx-size-bytes=2048 \ --target-l1-tx-size-bytes=2048 \
--l1-eth-rpc=$CERC_L1_RPC \ --l1-eth-rpc=$L1_RPC \
--private-key=$BATCHER_KEY --private-key=$BATCHER_KEY
@@ -4,8 +4,6 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}"
# Get SEQUENCER KEY from keys.json # Get SEQUENCER KEY from keys.json
SEQUENCER_KEY=$(jq -r '.Sequencer.privateKey' /l2-accounts/keys.json | tr -d '"') SEQUENCER_KEY=$(jq -r '.Sequencer.privateKey' /l2-accounts/keys.json | tr -d '"')
@@ -21,5 +19,5 @@ op-node \
--p2p.disable \ --p2p.disable \
--rpc.enable-admin \ --rpc.enable-admin \
--p2p.sequencer.key=$SEQUENCER_KEY \ --p2p.sequencer.key=$SEQUENCER_KEY \
--l1=$CERC_L1_RPC \ --l1=$L1_RPC \
--l1.rpckind=any --l1.rpckind=any
@@ -4,36 +4,30 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
CERC_L2_GETH_RPC="${CERC_L2_GETH_RPC:-${DEFAULT_CERC_L2_GETH_RPC}}" echo "Using L2 RPC endpoint ${L2_GETH_RPC}"
CERC_PRIVATE_KEY_DEPLOYER="${CERC_PRIVATE_KEY_DEPLOYER:-${DEFAULT_CERC_PRIVATE_KEY_DEPLOYER}}"
CERC_MOBYMASK_APP_BASE_URI="${CERC_MOBYMASK_APP_BASE_URI:-${DEFAULT_CERC_MOBYMASK_APP_BASE_URI}}"
CERC_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRACT}}"
echo "Using L2 RPC endpoint ${CERC_L2_GETH_RPC}"
if [ -f /geth-accounts/accounts.csv ]; then if [ -f /geth-accounts/accounts.csv ]; then
echo "Using L1 private key from the mounted volume" echo "Using L1 private key from the mounted volume"
# Read the private key of L1 account to deploy contract # Read the private key of L1 account to deploy contract
CERC_PRIVATE_KEY_DEPLOYER=$(head -n 1 /geth-accounts/accounts.csv | cut -d ',' -f 3) PRIVATE_KEY_DEPLOYER=$(head -n 1 /geth-accounts/accounts.csv | cut -d ',' -f 3)
else else
echo "Using CERC_PRIVATE_KEY_DEPLOYER from env" echo "Using PRIVATE_KEY_DEPLOYER from env"
fi fi
# Set the private key # Set the private key
jq --arg privateKey "$CERC_PRIVATE_KEY_DEPLOYER" '.privateKey = $privateKey' secrets-template.json > secrets.json jq --arg privateKey "$PRIVATE_KEY_DEPLOYER" '.privateKey = $privateKey' secrets-template.json > secrets.json
# Set the RPC URL # Set the RPC URL
jq --arg rpcUrl "$CERC_L2_GETH_RPC" '.rpcUrl = $rpcUrl' secrets.json > secrets_updated.json && mv secrets_updated.json secrets.json jq --arg rpcUrl "$L2_GETH_RPC" '.rpcUrl = $rpcUrl' secrets.json > secrets_updated.json && mv secrets_updated.json secrets.json
# Set the MobyMask app base URI # Set the MobyMask app base URI
jq --arg baseURI "$CERC_MOBYMASK_APP_BASE_URI" '.baseURI = $baseURI' secrets.json > secrets_updated.json && mv secrets_updated.json secrets.json jq --arg baseURI "$MOBYMASK_APP_BASE_URI" '.baseURI = $baseURI' secrets.json > secrets_updated.json && mv secrets_updated.json secrets.json
export RPC_URL="${CERC_L2_GETH_RPC}" export RPC_URL="${L2_GETH_RPC}"
# Check if CERC_DEPLOYED_CONTRACT environment variable set to skip contract deployment # Check if DEPLOYED_CONTRACT environment variable set to skip contract deployment
if [ -n "$CERC_DEPLOYED_CONTRACT" ]; then if [[ -n "$DEPLOYED_CONTRACT" ]]; then
echo "CERC_DEPLOYED_CONTRACT is set to '$CERC_DEPLOYED_CONTRACT'" echo "DEPLOYED_CONTRACT is set to '$DEPLOYED_CONTRACT'"
echo "Exiting without deploying contract" echo "Exiting without deploying contract"
exit 0 exit 0
fi fi
@@ -59,7 +53,7 @@ fi
# Wait until balance for deployer account is updated # Wait until balance for deployer account is updated
cd ../hardhat cd ../hardhat
while true; do while true; do
ACCOUNT_BALANCE=$(yarn balance --network optimism "$CERC_PRIVATE_KEY_DEPLOYER" | grep ETH) ACCOUNT_BALANCE=$(yarn balance --network optimism "$PRIVATE_KEY_DEPLOYER" | grep ETH)
if [ "$ACCOUNT_BALANCE" != "0.0 ETH" ]; then if [ "$ACCOUNT_BALANCE" != "0.0 ETH" ]; then
echo "Account balance updated: $ACCOUNT_BALANCE" echo "Account balance updated: $ACCOUNT_BALANCE"
@@ -1,6 +1,8 @@
{ {
"name": "MobyMask", "name": "MobyMask",
"relayNodes": [], "relayNodes": [
"/ip4/127.0.0.1/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t"
],
"peer": { "peer": {
"enableDebugInfo": true "enableDebugInfo": true
} }
@@ -4,37 +4,22 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
CERC_CHAIN_ID="${CERC_CHAIN_ID:-${DEFAULT_CERC_CHAIN_ID}}"
CERC_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRACT}}"
CERC_RELAY_NODES="${CERC_RELAY_NODES:-${DEFAULT_CERC_RELAY_NODES}}"
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 [ -z "$CERC_RELAY_NODES" ] || [ "$CERC_RELAY_NODES" = "[]" ]; then
echo "CERC_RELAY_NODES not provided, taking from the mounted volume"
CERC_RELAY_NODES="[\"/ip4/127.0.0.1/tcp/9090/ws/p2p/$(jq -r '.id' /peers/relay-id.json)\"]"
fi
echo "Using CERC_RELAY_NODES $CERC_RELAY_NODES"
# Use config from mounted volume if available (when running web-app along with watcher stack) # Use config from mounted volume if available (when running web-app along with watcher stack)
if [ -f /server/config.json ]; then if [ -f /server/config.json ]; then
echo "Taking config for deployed contract from mounted volume" echo "Merging config for deployed contract from mounted volume"
# Merging config files to get deployed contract address
# Get deployed contract address and chain id jq -s '.[0] * .[1]' /app/src/mobymask-app-config.json /server/config.json > /app/src/config.json
CERC_DEPLOYED_CONTRACT=$(jq -r '.address' /server/config.json | tr -d '"')
CERC_CHAIN_ID=$(jq -r '.chainId' /server/config.json)
else else
echo "Taking deployed contract details from env" echo "Setting deployed contract details from env"
# Set config values from environment variables
jq --arg address "$DEPLOYED_CONTRACT" \
--argjson chainId $CHAIN_ID \
--argjson relayNodes "$RELAY_NODES" \
'.address = $address | .chainId = $chainId | .relayNodes = $relayNodes' \
/app/src/mobymask-app-config.json > /app/src/config.json
fi fi
# Export config values in a json file REACT_APP_WATCHER_URI="$APP_WATCHER_URL/graphql" npm run build
jq --arg address "$CERC_DEPLOYED_CONTRACT" \
--argjson chainId "$CERC_CHAIN_ID" \
--argjson relayNodes "$CERC_RELAY_NODES" \
'.address = $address | .chainId = $chainId | .relayNodes = $relayNodes' \
/app/src/mobymask-app-config.json > /app/src/config.json
REACT_APP_WATCHER_URI="$CERC_APP_WATCHER_URL/graphql" npm run build
serve -s build serve -s build
@@ -1,28 +1,20 @@
# Defaults # Change if pointing web app to external watcher endpoint
WATCHER_HOST="mobymask-watcher-server"
# Watcher endpoint WATCHER_PORT=3001
DEFAULT_CERC_WATCHER_HOST="mobymask-watcher-server" APP_WATCHER_URL="http://localhost:3001"
DEFAULT_CERC_WATCHER_PORT=3001
DEFAULT_CERC_APP_WATCHER_URL="http://localhost:3001"
# Set of relay peers to connect to from the relay node
DEFAULT_CERC_RELAY_PEERS=[]
# Domain to be used in the relay node's announce address
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:3002/#" 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 ENABLE_PEER_L2_TXS=true
# Set deployed MobyMask contract address to avoid deploying contract in stack # Set deployed MobyMask contract address to avoid deploying contract in stack
# mobymask-app will use this contract address in config if run separately # mobymask-app will use this contract address in config if run separately
DEFAULT_CERC_DEPLOYED_CONTRACT= DEPLOYED_CONTRACT=
# Chain ID is used by mobymask web-app for txs # Chain ID is used by mobymask web-app for txs
DEFAULT_CERC_CHAIN_ID=42069 CHAIN_ID=42069
# Set of relay nodes to be used by web-apps # Set relay nodes to be used by web-apps
DEFAULT_CERC_RELAY_NODES=[] RELAY_NODES=["/ip4/127.0.0.1/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t"]
@@ -1,13 +1,13 @@
# Defaults # Change if pointing to an external optimism geth endpoint
# L2 endpoints # L2 endpoints
DEFAULT_CERC_L2_GETH_RPC="http://op-geth:8545" L2_GETH_RPC="http://op-geth:8545"
DEFAULT_CERC_L2_GETH_HOST="op-geth" L2_GETH_HOST="op-geth"
DEFAULT_CERC_L2_GETH_PORT=8545 L2_GETH_PORT=8545
DEFAULT_CERC_L2_NODE_HOST="op-node" L2_NODE_HOST="op-node"
DEFAULT_CERC_L2_NODE_PORT=8547 L2_NODE_PORT=8547
# Credentials for accounts to perform txs on L2 # Credentials for accounts to perform txs on L2
DEFAULT_CERC_PRIVATE_KEY_DEPLOYER= PRIVATE_KEY_DEPLOYER=
DEFAULT_CERC_PRIVATE_KEY_PEER= PRIVATE_KEY_PEER=
@@ -0,0 +1,5 @@
{
"id": "12D3KooWK6myjc8r1KBnfP9igp31qJkPaVfsKDjKrjoSefV5SDEo",
"privKey": "CAESQJMHbMaH+UEOtjGOzXYtoPO/cdHakCtN1hcnknIWzx/6ie1lxb+8kfzBjwt7apfj8fHlTCYSIVK8Q2AWu9a2h3g=",
"pubKey": "CAESIIntZcW/vJH8wY8Le2qX4/Hx5UwmEiFSvENgFrvWtod4"
}
@@ -0,0 +1 @@
RELAY="/ip4/127.0.0.1/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t"
@@ -0,0 +1,5 @@
{
"id": "12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t",
"privKey": "CAESQGsqG5o4VlWJZM9XlA3MjabyZOXWQ2MLZU5AhBQsjXGt9iSlGtTuNOrHX5xSRgLBxLuMoqWsjGxE/dDB9c46RI8=",
"pubKey": "CAESIPYkpRrU7jTqx1+cUkYCwcS7jKKlrIxsRP3QwfXOOkSP"
}
@@ -4,40 +4,11 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
CERC_L2_GETH_RPC="${CERC_L2_GETH_RPC:-${DEFAULT_CERC_L2_GETH_RPC}}" echo "Using L2 RPC endpoint ${L2_GETH_RPC}"
CERC_PRIVATE_KEY_PEER="${CERC_PRIVATE_KEY_PEER:-${DEFAULT_CERC_PRIVATE_KEY_PEER}}"
CERC_RELAY_PEERS="${CERC_RELAY_PEERS:-${DEFAULT_CERC_RELAY_PEERS}}"
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_DEPLOYED_CONTRACT="${CERC_DEPLOYED_CONTRACT:-${DEFAULT_CERC_DEPLOYED_CONTRACT}}"
echo "Using L2 RPC endpoint ${CERC_L2_GETH_RPC}"
# Check for peer ids in ./peers folder, create if not present
if [ -f ./peers/relay-id.json ]; then
echo "Using peer id for relay node from the mounted volume"
else
echo "Creating a new peer id for relay node"
cd ../peer
yarn create-peer -f ../mobymask-v2-watcher/peers/relay-id.json
cd ../mobymask-v2-watcher
fi
if [ -f ./peers/peer-id.json ]; then
echo "Using peer id for peer node from the mounted volume"
else
echo "Creating a new peer id for peer node"
cd ../peer
yarn create-peer -f ../mobymask-v2-watcher/peers/peer-id.json
cd ../mobymask-v2-watcher
fi
CERC_RELAY_MULTIADDR="/dns4/mobymask-watcher-server/tcp/9090/ws/p2p/$(jq -r '.id' ./peers/relay-id.json)"
# Use contract address from environment variable or set from config.json in mounted volume # Use contract address from environment variable or set from config.json in mounted volume
if [ -n "$CERC_DEPLOYED_CONTRACT" ]; then if [ -n "$DEPLOYED_CONTRACT" ]; then
CONTRACT_ADDRESS="${CERC_DEPLOYED_CONTRACT}" CONTRACT_ADDRESS="${DEPLOYED_CONTRACT}"
else else
# Assign deployed contract address from server config (created by mobymask container after deploying contract) # Assign deployed contract address from server config (created by mobymask container after deploying contract)
CONTRACT_ADDRESS=$(jq -r '.address' /server/config.json | tr -d '"') CONTRACT_ADDRESS=$(jq -r '.address' /server/config.json | tr -d '"')
@@ -46,27 +17,22 @@ fi
if [ -f /geth-accounts/accounts.csv ]; then if [ -f /geth-accounts/accounts.csv ]; then
echo "Using L1 private key from the mounted volume" echo "Using L1 private key from the mounted volume"
# Read the private key of L1 account for sending txs from peer # Read the private key of L1 account for sending txs from peer
CERC_PRIVATE_KEY_PEER=$(awk -F, 'NR==2{print $NF}' /geth-accounts/accounts.csv) PRIVATE_KEY_PEER=$(awk -F, 'NR==2{print $NF}' /geth-accounts/accounts.csv)
else else
echo "Using CERC_PRIVATE_KEY_PEER from env" echo "Using PRIVATE_KEY_PEER from env"
fi fi
# Read in the config template TOML file and modify it # Read in the config template TOML file and modify it
WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml) WATCHER_CONFIG_TEMPLATE=$(cat environments/watcher-config-template.toml)
WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \ WATCHER_CONFIG=$(echo "$WATCHER_CONFIG_TEMPLATE" | \
sed -E "s|REPLACE_WITH_CERC_RELAY_PEERS|${CERC_RELAY_PEERS}|g; \ sed -E "s/REPLACE_WITH_ENABLE_PEER_L2_TXS/${ENABLE_PEER_L2_TXS}/g; \
s/REPLACE_WITH_CERC_RELAY_ANNOUNCE_DOMAIN/${CERC_RELAY_ANNOUNCE_DOMAIN}/g; \ s/REPLACE_WITH_PRIVATE_KEY_PEER/${PRIVATE_KEY_PEER}/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_PRIVATE_KEY_PEER/${CERC_PRIVATE_KEY_PEER}/g; \
s/REPLACE_WITH_CONTRACT_ADDRESS/${CONTRACT_ADDRESS}/g; \ s/REPLACE_WITH_CONTRACT_ADDRESS/${CONTRACT_ADDRESS}/g; \
s|REPLACE_WITH_CERC_L2_GETH_RPC_ENDPOINT|${CERC_L2_GETH_RPC}| ") s|REPLACE_WITH_L2_GETH_RPC_ENDPOINT|${L2_GETH_RPC}| ")
# Write the modified content to a new file # Write the modified content to a new file
echo "$WATCHER_CONFIG" > environments/local.toml echo "$WATCHER_CONFIG" > environments/local.toml
# Write the relay node's multiaddr to /app/packages/peer/.env for running tests
echo "RELAY=\"$CERC_RELAY_MULTIADDR\"" > /app/packages/peer/.env
echo 'yarn server' echo 'yarn server'
yarn server yarn server
@@ -1,5 +1,7 @@
{ {
"relayNodes": [], "relayNodes": [
"/ip4/127.0.0.1/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t"
],
"peer": { "peer": {
"enableDebugInfo": true "enableDebugInfo": true
} }
@@ -4,18 +4,8 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
CERC_RELAY_NODES="${CERC_RELAY_NODES:-${DEFAULT_CERC_RELAY_NODES}}" # Set relay nodes in config from RELAY_NODES environment variable
jq --argjson relayNodes "$RELAY_NODES" \
# If not set (or []), check the mounted volume for relay peer id
if [ -z "$CERC_RELAY_NODES" ] || [ "$CERC_RELAY_NODES" = "[]" ]; then
echo "CERC_RELAY_NODES not provided, taking from the mounted volume"
CERC_RELAY_NODES="[\"/ip4/127.0.0.1/tcp/9090/ws/p2p/$(jq -r '.id' /peers/relay-id.json)\"]"
fi
echo "Using CERC_RELAY_NODES $CERC_RELAY_NODES"
# Set relay nodes in config using CERC_RELAY_NODES
jq --argjson relayNodes "$CERC_RELAY_NODES" \
'.relayNodes = $relayNodes' \ '.relayNodes = $relayNodes' \
./src/test-app-config.json > ./src/config.json ./src/test-app-config.json > ./src/config.json
@@ -26,20 +26,19 @@
[server.p2p.relay] [server.p2p.relay]
host = "0.0.0.0" host = "0.0.0.0"
port = 9090 port = 9090
relayPeers = REPLACE_WITH_CERC_RELAY_PEERS relayPeers = []
peerIdFile = './peers/relay-id.json' peerIdFile = './relay-id.json'
announce = 'REPLACE_WITH_CERC_RELAY_ANNOUNCE_DOMAIN'
enableDebugInfo = true enableDebugInfo = true
[server.p2p.peer] [server.p2p.peer]
relayMultiaddr = 'REPLACE_WITH_CERC_RELAY_MULTIADDR' relayMultiaddr = '/dns4/mobymask-watcher-server/tcp/9090/ws/p2p/12D3KooWSPCsVkHVyLQoCqhu2YRPvvM7o6r6NRYyLM5zeA6Uig5t'
pubSubTopic = 'mobymask' pubSubTopic = 'mobymask'
peerIdFile = './peers/peer-id.json' peerIdFile = './peer-id.json'
enableDebugInfo = true enableDebugInfo = true
enableL2Txs = REPLACE_WITH_CERC_ENABLE_PEER_L2_TXS enableL2Txs = REPLACE_WITH_ENABLE_PEER_L2_TXS
[server.p2p.peer.l2TxsConfig] [server.p2p.peer.l2TxsConfig]
privateKey = 'REPLACE_WITH_CERC_PRIVATE_KEY_PEER' privateKey = 'REPLACE_WITH_PRIVATE_KEY_PEER'
contractAddress = 'REPLACE_WITH_CONTRACT_ADDRESS' contractAddress = 'REPLACE_WITH_CONTRACT_ADDRESS'
[metrics] [metrics]
@@ -61,7 +60,7 @@
[upstream] [upstream]
[upstream.ethServer] [upstream.ethServer]
gqlApiEndpoint = "http://ipld-eth-server:8083/graphql" gqlApiEndpoint = "http://ipld-eth-server:8083/graphql"
rpcProviderEndpoint = "REPLACE_WITH_CERC_L2_GETH_RPC_ENDPOINT" rpcProviderEndpoint = "REPLACE_WITH_L2_GETH_RPC_ENDPOINT"
blockDelayInMilliSecs = 60000 blockDelayInMilliSecs = 60000
[upstream.cache] [upstream.cache]
-13
View File
@@ -1,13 +0,0 @@
# source'ed into container build scripts to do generic command setup
if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
set -x
echo "Build environment variables:"
env
fi
build_command_args=""
if [[ ${CERC_FORCE_REBUILD} == "true" ]]; then
build_command_args="${build_command_args} --no-cache"
fi
if [[ -n "$CERC_CONTAINER_EXTRA_BUILD_ARGS" ]]; then
build_command_args="${build_command_args} ${CERC_CONTAINER_EXTRA_BUILD_ARGS}"
fi
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build a local version of the task executor for act-runner # Build a local version of the task executor for act-runner
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/act-runner-task-executor:local -f ${CERC_REPO_BASE_DIR}/act_runner/Dockerfile.task-executor ${CERC_REPO_BASE_DIR}/act_runner
docker build -t cerc/act-runner-task-executor:local -f ${CERC_REPO_BASE_DIR}/hosting/gitea/Dockerfile.task-executor ${build_command_args} ${CERC_REPO_BASE_DIR}/hosting
@@ -1,5 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# Build a local version of the act-runner image # Build a local version of the act-runner image
# TODO: enhance the default build code path to cope with this container (repo has an _ which needs to be converted to - in the image tag) docker build -t cerc/act-runner:local -f ${CERC_REPO_BASE_DIR}/act_runner/Dockerfile ${CERC_REPO_BASE_DIR}/act_runner
docker build -t cerc/act-runner:local -f ${CERC_REPO_BASE_DIR}/act_runner/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/act_runner
@@ -29,9 +29,6 @@ RUN \
usermod -u ${CERC_HOST_UID} -g ${CERC_HOST_GID} ${USERNAME} && chown ${CERC_HOST_UID}:${CERC_HOST_GID} /home/${USERNAME}; \ usermod -u ${CERC_HOST_UID} -g ${CERC_HOST_GID} ${USERNAME} && chown ${CERC_HOST_UID}:${CERC_HOST_GID} /home/${USERNAME}; \
fi fi
# Prevents npm from printing version warnings
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
RUN \ RUN \
# Configure global npm install location, use group to adapt to UID/GID changes # Configure global npm install location, use group to adapt to UID/GID changes
if ! cat /etc/group | grep -e "^npm:" > /dev/null 2>&1; then groupadd -r npm; fi \ if ! cat /etc/group | grep -e "^npm:" > /dev/null 2>&1; then groupadd -r npm; fi \
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Usage: build-npm-package-local-dependencies.sh <registry-url> <publish-with-this-version> # Usage: build-npm-package-local-dependencies.sh <registry-url> <publish-with-this-version>
# Runs build-npm-package.sh after first fixing up yarn.lock to use a local # Runs build-npm-package.sh after first fixing up yarn.lock to use a local
# npm registry for all packages in a specific scope (currently @cerc-io, @lirewine and @muknsys) # npm registry for all packages in a spcific scope (currently @cerc-io and @lirewine)
if [ -n "$CERC_SCRIPT_DEBUG" ]; then if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
@@ -18,7 +18,7 @@ set -e
local_npm_registry_url=$1 local_npm_registry_url=$1
package_publish_version=$2 package_publish_version=$2
# If we need to handle an additional scope, add it to the list below: # If we need to handle an additional scope, add it to the list below:
npm_scopes_to_handle=("@cerc-io" "@lirewine" "@muknsys") npm_scopes_to_handle=("@cerc-io" "@lirewine")
for npm_scope_for_local in ${npm_scopes_to_handle[@]} for npm_scope_for_local in ${npm_scopes_to_handle[@]}
do do
# We need to configure the local registry # We need to configure the local registry
@@ -24,22 +24,12 @@ package_name=$( cat package.json | jq -r .name )
local_npm_registry_url=$1 local_npm_registry_url=$1
npm config set @cerc-io:registry ${local_npm_registry_url} npm config set @cerc-io:registry ${local_npm_registry_url}
npm config set @lirewine:registry ${local_npm_registry_url} npm config set @lirewine:registry ${local_npm_registry_url}
npm config set @muknsys:registry ${local_npm_registry_url} npm config set -- ${local_npm_registry_url}:_authToken ${CERC_NPM_AUTH_TOKEN}
# Workaround bug in npm unpublish where it needs the url to be of the form //<foo> and not http://<foo>
local_npm_registry_url_fixed=$( echo ${local_npm_registry_url} | sed -e 's/^http[s]\{0,1\}://')
npm config set -- ${local_npm_registry_url_fixed}:_authToken ${CERC_NPM_AUTH_TOKEN}
# First check if the version of this package we're trying to build already exists in the registry # First check if the version of this package we're trying to build already exists in the registry
package_exists=$( yarn info --json ${package_name}@${package_publish_version} 2>/dev/null | jq -r .data.dist.tarball ) package_exists=$( yarn info --json ${package_name}@${package_publish_version} 2>/dev/null | jq -r .data.dist.tarball )
if [[ ! -z "$package_exists" && "$package_exists" != "null" ]]; then if [[ ! -z "$package_exists" && "$package_exists" != "null" ]]; then
echo "${package_publish_version} of ${package_name} already exists in the registry" echo "${package_publish_version} of ${package_name} already exists in the registry, skipping build"
if [[ ${CERC_FORCE_REBUILD} == "true" ]]; then exit 0
# Attempt to unpublish the existing package
echo "NOTE: unpublishing existing package version since force rebuild is enabled"
npm unpublish --force ${package_name}@${package_publish_version}
else
echo "skipping build since target version already exists"
exit 0
fi
fi fi
echo "Build and publish ${package_name} version ${package_publish_version}" echo "Build and publish ${package_name} version ${package_publish_version}"
yarn install yarn install
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/eth-probe # Build cerc/eth-probe
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/eth-probe:local ${CERC_REPO_BASE_DIR}/eth-probe
docker build -t cerc/eth-probe:local ${build_command_args} ${CERC_REPO_BASE_DIR}/eth-probe
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/eth-statediff-fill-service # Build cerc/eth-statediff-fill-service
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/eth-statediff-fill-service:local ${CERC_REPO_BASE_DIR}/eth-statediff-fill-service
docker build -t cerc/eth-statediff-fill-service:local ${build_command_args} ${CERC_REPO_BASE_DIR}/eth-statediff-fill-service
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/eth-statediff-service # Build cerc/eth-statediff-service
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/eth-statediff-service:local ${CERC_REPO_BASE_DIR}/eth-statediff-service
docker build -t cerc/eth-statediff-service:local ${build_command_args} ${CERC_REPO_BASE_DIR}/eth-statediff-service
@@ -1,8 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/fixturenet-eth-geth # Build cerc/fixturenet-eth-geth
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/fixturenet-eth-geth:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} $SCRIPT_DIR docker build -t cerc/fixturenet-eth-geth:local -f ${SCRIPT_DIR}/Dockerfile $SCRIPT_DIR
@@ -1,8 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/fixturenet-eth-lighthouse # Build cerc/fixturenet-eth-lighthouse
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/fixturenet-eth-lighthouse:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} $SCRIPT_DIR docker build -t cerc/fixturenet-eth-lighthouse:local -f ${SCRIPT_DIR}/Dockerfile $SCRIPT_DIR
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build a local version of the foundry-rs/foundry image # Build a local version of the foundry-rs/foundry image
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/foundry:local -f ${CERC_REPO_BASE_DIR}/foundry/Dockerfile-debian ${CERC_REPO_BASE_DIR}/foundry
docker build -t cerc/foundry:local -f ${CERC_REPO_BASE_DIR}/foundry/Dockerfile-debian ${build_command_args} ${CERC_REPO_BASE_DIR}/foundry
@@ -1,9 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/go-ethereum-foundry # Build cerc/go-ethereum-foundry
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/go-ethereum-foundry:local --build-arg GENESIS_FILE_PATH=genesis-automine.json ${build_command_args} ${SCRIPT_DIR} docker build -t cerc/go-ethereum-foundry:local --build-arg GENESIS_FILE_PATH=genesis-automine.json ${SCRIPT_DIR}
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/go-ethereum # Build cerc/go-ethereum
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/go-ethereum:local ${CERC_REPO_BASE_DIR}/go-ethereum
docker build -t cerc/go-ethereum:local ${build_command_args} ${CERC_REPO_BASE_DIR}/go-ethereum
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/ipld-eth-beacon-db # Build cerc/ipld-eth-beacon-db
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/ipld-eth-beacon-db:local ${CERC_REPO_BASE_DIR}/ipld-eth-beacon-db
docker build -t cerc/ipld-eth-beacon-db:local ${build_command_args} ${build_command_args} ${CERC_REPO_BASE_DIR}/ipld-eth-beacon-db
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/ipld-eth-beacon-indexer # Build cerc/ipld-eth-beacon-indexer
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/ipld-eth-beacon-indexer:local ${CERC_REPO_BASE_DIR}/ipld-eth-beacon-indexer
docker build -t cerc/ipld-eth-beacon-indexer:local ${build_command_args} ${CERC_REPO_BASE_DIR}/ipld-eth-beacon-indexer
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/ipld-eth-db # Build cerc/ipld-eth-db
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/ipld-eth-db:local ${CERC_REPO_BASE_DIR}/ipld-eth-db
docker build -t cerc/ipld-eth-db:local ${build_command_args} ${CERC_REPO_BASE_DIR}/ipld-eth-db
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/ipld-eth-server # Build cerc/ipld-eth-server
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/ipld-eth-server:local ${CERC_REPO_BASE_DIR}/ipld-eth-server
docker build -t cerc/ipld-eth-server:local ${build_command_args} ${CERC_REPO_BASE_DIR}/ipld-eth-server
@@ -2,9 +2,7 @@
# #
#Build cerc/keycloack #Build cerc/keycloack
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/keycloak:local ${build_command_args} ${SCRIPT_DIR} docker build -t cerc/keycloak:local ${SCRIPT_DIR}
@@ -7,13 +7,11 @@ ARG USERNAME=node
ARG NPM_GLOBAL=/usr/local/share/npm-global ARG NPM_GLOBAL=/usr/local/share/npm-global
# This container pulls npm packages from a local registry configured via these env vars # This container pulls npm packages from a local registry configured via these env vars
ARG CERC_NPM_REGISTRY_URL ARG CERC_NPM_URL
ARG CERC_NPM_AUTH_TOKEN ARG CERC_NPM_AUTH_TOKEN
# Add NPM global to PATH. # Add NPM global to PATH.
ENV PATH=${NPM_GLOBAL}/bin:${PATH} ENV PATH=${NPM_GLOBAL}/bin:${PATH}
# Prevents npm from printing version warnings
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
RUN \ RUN \
# Configure global npm install location, use group to adapt to UID/GID changes # Configure global npm install location, use group to adapt to UID/GID changes
@@ -49,9 +47,9 @@ COPY ./start-serving-app.sh /scripts
# RUN su node -c "npm install -g <your-package-list-here>" # RUN su node -c "npm install -g <your-package-list-here>"
# Configure the local npm registry # Configure the local npm registry
RUN npm config set @cerc-io:registry ${CERC_NPM_REGISTRY_URL} \ RUN npm config set @cerc-io:registry ${CERC_NPM_URL} \
&& npm config set @lirewine:registry ${CERC_NPM_REGISTRY_URL} \ && npm config set @lirewine:registry ${CERC_NPM_URL} \
&& npm config set -- ${CERC_NPM_REGISTRY_URL}:_authToken ${CERC_NPM_AUTH_TOKEN} && npm config set -- ${CERC_NPM_URL}:_authToken ${CERC_NPM_AUTH_TOKEN}
RUN mkdir -p /config RUN mkdir -p /config
COPY ./config.yml /config COPY ./config.yml /config
@@ -8,11 +8,11 @@ if [[ $# -ne 2 ]]; then
fi fi
config_file_name=$1 config_file_name=$1
webapp_files_dir=$2 webapp_files_dir=$2
if ! [[ -f ${config_file_name} ]]; then if ![[ -f ${config_file_name} ]]; then
echo "Config file ${config_file_name} does not exist" >&2 echo "Config file ${config_file_name} does not exist" >&2
exit 1 exit 1
fi fi
if ! [[ -d ${webapp_files_dir} ]]; then if ![[ -d ${webapp_files_dir} ]]; then
echo "Webapp directory ${webapp_files_dir} does not exist" >&2 echo "Webapp directory ${webapp_files_dir} does not exist" >&2
exit 1 exit 1
fi fi
@@ -1,11 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/laconic-registry-cli # Build cerc/laconic-registry-cli
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/laconic-console-host:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile \ docker build -t cerc/laconic-console-host:local -f ${SCRIPT_DIR}/Dockerfile \
--add-host gitea.local:host-gateway \ --add-host gitea.local:host-gateway \
--build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_REGISTRY_URL ${SCRIPT_DIR} --build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_URL ${SCRIPT_DIR}
@@ -7,13 +7,11 @@ ARG USERNAME=node
ARG NPM_GLOBAL=/usr/local/share/npm-global ARG NPM_GLOBAL=/usr/local/share/npm-global
# This container pulls npm packages from a local registry configured via these env vars # This container pulls npm packages from a local registry configured via these env vars
ARG CERC_NPM_REGISTRY_URL ARG CERC_NPM_URL
ARG CERC_NPM_AUTH_TOKEN ARG CERC_NPM_AUTH_TOKEN
# Add NPM global to PATH. # Add NPM global to PATH.
ENV PATH=${NPM_GLOBAL}/bin:${PATH} ENV PATH=${NPM_GLOBAL}/bin:${PATH}
# Prevents npm from printing version warnings
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
RUN \ RUN \
# Configure global npm install location, use group to adapt to UID/GID changes # Configure global npm install location, use group to adapt to UID/GID changes
@@ -42,9 +40,9 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# RUN su node -c "npm install -g <your-package-list-here>" # RUN su node -c "npm install -g <your-package-list-here>"
# Configure the local npm registry # Configure the local npm registry
RUN npm config set @cerc-io:registry ${CERC_NPM_REGISTRY_URL} \ RUN npm config set @cerc-io:registry ${CERC_NPM_URL} \
&& npm config set @lirewine:registry ${CERC_NPM_REGISTRY_URL} \ && npm config set @lirewine:registry ${CERC_NPM_URL} \
&& npm config set -- ${CERC_NPM_REGISTRY_URL}:_authToken ${CERC_NPM_AUTH_TOKEN} && npm config set -- ${CERC_NPM_URL}:_authToken ${CERC_NPM_AUTH_TOKEN}
# TODO: the image at this point could be made a base image for several different CLI images # TODO: the image at this point could be made a base image for several different CLI images
# that install different Node-based CLI commands # that install different Node-based CLI commands
@@ -55,9 +53,7 @@ RUN yarn global add @cerc-io/laconic-registry-cli
# Add scripts # Add scripts
RUN mkdir /scripts RUN mkdir /scripts
ENV PATH="${PATH}:/scripts" ENV PATH="${PATH}:/scripts"
COPY ./create-demo-records.sh /scripts
COPY ./import-key.sh /scripts COPY ./import-key.sh /scripts
COPY ./import-address.sh /scripts
# Default command sleeps forever so docker doesn't kill it # Default command sleeps forever so docker doesn't kill it
CMD ["sh", "-c", "while :; do sleep 600; done"] CMD ["sh", "-c", "while :; do sleep 600; done"]
@@ -1,11 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/laconic-registry-cli # Build cerc/laconic-registry-cli
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/laconic-registry-cli:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile \ docker build -t cerc/laconic-registry-cli:local -f ${SCRIPT_DIR}/Dockerfile \
--add-host gitea.local:host-gateway \ --add-host gitea.local:host-gateway \
--build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_REGISTRY_URL ${SCRIPT_DIR} --build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_URL ${SCRIPT_DIR}
@@ -1,29 +0,0 @@
#!/usr/bin/env bash
# Create some demo/test records in the registry
set -e
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
registry_command="laconic cns"
record_1_filename=demo-record-1.yml
cat <<EOF > ${record_1_filename}
record:
type: WebsiteRegistrationRecord
url: 'https://cerc.io'
repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D
build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9
tls_cert_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
version: 1.0.23
EOF
# Check we have funds
funds_response=$(${registry_command} account get --address $(cat my-address.txt))
funds_balance=$(echo ${funds_response} | jq -r .[0].balance[0].quantity)
echo "Balance is: ${funds_balance}"
# Create a bond
bond_create_result=$(${registry_command} bond create --type aphoton --quantity 1000000000)
bond_id=$(echo ${bond_create_result} | jq -r .bondId)
echo "Created bond with id: ${bond_id}"
# Publish a demo record
publish_response=$(${registry_command} record publish --filename ${record_1_filename} --bond-id ${bond_id})
published_record_id=$(echo ${publish_response} | jq -r .id)
echo "Published ${record_1_filename} with id: ${published_record_id}"
@@ -1,2 +0,0 @@
#!/bin/sh
echo ${1} > my-address.txt
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/laconicd # Build cerc/chiba-clonk
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/laconicd:local ${CERC_REPO_BASE_DIR}/laconicd
docker build -t cerc/laconicd:local ${build_command_args} ${CERC_REPO_BASE_DIR}/laconicd
@@ -1,9 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/lighthouse # Build cerc/lighthouse
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/lighthouse:local ${build_command_args} ${SCRIPT_DIR} docker build -t cerc/lighthouse:local ${SCRIPT_DIR}
@@ -1,9 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/mobymask-ui # Build cerc/mobymask-ui
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/mobymask-ui:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/mobymask-ui docker build -t cerc/mobymask-ui:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/mobymask-ui
@@ -1,9 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/mobymask # Build cerc/mobymask
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/mobymask:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/MobyMask docker build -t cerc/mobymask:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/MobyMask
@@ -1,9 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/optimism-contracts # Build cerc/optimism-contracts
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/optimism-contracts:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/optimism docker build -t cerc/optimism-contracts:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/optimism
@@ -8,7 +8,7 @@ task('send-balance', 'Sends Ether to a specified Ethereum account')
.addParam('privateKey', 'The private key of the sender') .addParam('privateKey', 'The private key of the sender')
.setAction(async ({ to, amount, privateKey }, {}) => { .setAction(async ({ to, amount, privateKey }, {}) => {
// Open the wallet using sender's private key // Open the wallet using sender's private key
const provider = new ethers.providers.JsonRpcProvider(`${process.env.CERC_L1_RPC}`) const provider = new ethers.providers.JsonRpcProvider(`${process.env.L1_RPC}`)
const wallet = new ethers.Wallet(privateKey, provider) const wallet = new ethers.Wallet(privateKey, provider)
// Send amount to the specified address // Send amount to the specified address
@@ -16,11 +16,7 @@ task('send-balance', 'Sends Ether to a specified Ethereum account')
to, to,
value: ethers.utils.parseEther(amount), value: ethers.utils.parseEther(amount),
}) })
const txReceipt = await tx.wait()
console.log(`Balance sent to: ${to}, from: ${wallet.address}`) console.log(`Balance sent to: ${to}, from: ${wallet.address}`)
console.log(
`Block: { number: ${txReceipt.blockNumber}, hash: ${txReceipt.blockHash} }`
)
console.log(`Transaction hash: ${tx.hash}`) console.log(`Transaction hash: ${tx.hash}`)
}) })
@@ -9,7 +9,7 @@ task(
.addParam('transactionHash', 'Hash of the deployment transaction') .addParam('transactionHash', 'Hash of the deployment transaction')
.setAction(async ({ contract, transactionHash }, { ethers }) => { .setAction(async ({ contract, transactionHash }, { ethers }) => {
const provider = new ethers.providers.JsonRpcProvider( const provider = new ethers.providers.JsonRpcProvider(
`${process.env.CERC_L1_RPC}` `${process.env.L1_RPC}`
) )
// Get the deployment tx receipt // Get the deployment tx receipt
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/optimism-l2geth # Build cerc/optimism-l2geth
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/optimism-l2geth:local ${CERC_REPO_BASE_DIR}/op-geth
docker build -t cerc/optimism-l2geth:local ${build_command_args} ${CERC_REPO_BASE_DIR}/op-geth
@@ -1,6 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/optimism-op-batcher # Build cerc/optimism-op-batcher
# TODO: use upstream Dockerfile once its buildx-specific content has been removed # TODO: use upstream Dockerfile once its buildx-specific content has been removed
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/optimism-op-batcher:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/optimism docker build -t cerc/optimism-op-batcher:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/optimism
@@ -1,6 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/optimism-op-node # Build cerc/optimism-op-node
# TODO: use upstream Dockerfile once its buildx-specific content has been removed # TODO: use upstream Dockerfile once its buildx-specific content has been removed
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/optimism-op-node:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/optimism docker build -t cerc/optimism-op-node:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/optimism
@@ -1,9 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/react-peer # Build cerc/react-peer
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/react-peer:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/react-peer docker build -t cerc/react-peer:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/react-peer
@@ -1,5 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/test-container # Build cerc/test-container
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/test-container:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} $SCRIPT_DIR docker build -t cerc/test-container:local -f ${SCRIPT_DIR}/Dockerfile $SCRIPT_DIR
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/test-contract # Build cerc/test-contract
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/test-contract:local --build-arg ETH_ADDR=http://go-ethereum:8545 ${CERC_REPO_BASE_DIR}/ipld-eth-db-validator/test/contract
docker build -t cerc/test-contract:local --build-arg ETH_ADDR=http://go-ethereum:8545 ${build_command_args} ${CERC_REPO_BASE_DIR}/ipld-eth-db-validator/test/contract
@@ -1,4 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/tx-spammer # Build cerc/tx-spammer
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh docker build -t cerc/tx-spammer:local ${CERC_REPO_BASE_DIR}/tx-spammer
docker build -t cerc/tx-spammer:local ${build_command_args} ${CERC_REPO_BASE_DIR}/tx-spammer
@@ -1,9 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/uniswap-v3-info # Build cerc/uniswap-v3-info
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/uniswap-v3-info:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/uniswap-v3-info docker build -t cerc/uniswap-v3-info:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/uniswap-v3-info
@@ -1,9 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/watcher-erc20 # Build cerc/watcher-erc20
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/watcher-erc20:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/watcher-ts docker build -t cerc/watcher-erc20:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/watcher-ts
@@ -1,9 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/watcher-erc721 # Build cerc/watcher-erc721
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/watcher-erc721:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/watcher-ts docker build -t cerc/watcher-erc721:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/watcher-ts
@@ -1,9 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/watcher-mobymask-v2 # Build cerc/watcher-mobymask-v2
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/watcher-mobymask-v2:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/watcher-ts docker build -t cerc/watcher-mobymask-v2:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/watcher-ts
@@ -1,11 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/watcher-mobymask # Build cerc/watcher-mobymask
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/watcher-mobymask:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/watcher-ts docker build -t cerc/watcher-mobymask:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/watcher-ts
# TODO: add a mechanism to pass two repos into a container rather than the parent directory # TODO: add a mechanism to pass two repos into a container rather than the parent directory
@@ -1,9 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Build cerc/watcher-uniswap-v3 # Build cerc/watcher-uniswap-v3
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505 # See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/watcher-uniswap-v3:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/uniswap-watcher-ts docker build -t cerc/watcher-uniswap-v3:local -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/uniswap-watcher-ts
+5 -4
View File
@@ -1,13 +1,14 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Usage: default-build.sh <image-tag> [<repo-relative-path>] # Usage: default-build.sh <image-tag> [<repo-relative-path>]
# if <repo-relative-path> is not supplied, the context is the directory where the Dockerfile lives # if <repo-relative-path> is not supplied, the context is the directory where the Dockerfile lives
if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh set -x
fi
if [[ $# -ne 2 ]]; then if [[ $# -ne 2 ]]; then
echo "Illegal number of parameters" >&2 echo "Illegal number of parameters" >&2
exit 1 exit 1
fi fi
image_tag=$1 image_tag=$1
build_dir=$2 build_dir=$2
docker build -t ${image_tag} ${build_command_args} --build-arg CERC_HOST_UID=${CERC_HOST_UID} --build-arg CERC_HOST_GID=${CERC_HOST_GID} ${build_dir} echo "Building ${image_tag} in ${build_dir}"
docker build -t ${image_tag} --build-arg CERC_HOST_UID=${CERC_HOST_UID} --build-arg CERC_HOST_GID=${CERC_HOST_GID} ${build_dir}
@@ -19,7 +19,6 @@ Detailed instructions can be found [here](../build-support/README.md). For the i
``` ```
$ laconic-so --stack build-support build-containers --exclude cerc/builder-gerbil $ laconic-so --stack build-support build-containers --exclude cerc/builder-gerbil
$ laconic-so --stack package-registry setup-repositories $ laconic-so --stack package-registry setup-repositories
$ laconic-so --stack package-registry build-containers
$ laconic-so --stack package-registry deploy-system up $ laconic-so --stack package-registry deploy-system up
``` ```
Then add the localhost alias `gitea.local` and set `CERC_NPM_AUTH_TOKEN` to the token printed when the package-registry stack was deployed above: Then add the localhost alias `gitea.local` and set `CERC_NPM_AUTH_TOKEN` to the token printed when the package-registry stack was deployed above:
@@ -49,18 +48,3 @@ $ laconic-so --stack fixturenet-laconicd deploy logs
``` ```
$ laconic-so --stack fixturenet-laconicd deploy exec cli "laconic cns status" $ laconic-so --stack fixturenet-laconicd deploy exec cli "laconic cns status"
``` ```
## 7. View the laconic console
Get the URL for the console web app with this command (the port number will be different for each deployment):
```
$ echo http://localhost:$(laconic-so --stack fixturenet-laconic-loaded deploy port laconic-console 80 | cut -d ':' -f 2)
http://localhost:58364
```
Open that address with a browser. The console should display
## 8. Load demo data into the registry
```
$ laconic-so --stack fixturenet-laconic-loaded deploy exec cli ./scripts/create-demo-records.sh
Balance is: 99998999999999998999600000
Created bond with id: dd88e8d6f9567b32b28e70552aea4419c5dd3307ebae85a284d1fe38904e301a
Published demo-record-1.yml with id: bafyreierh3xnfivexlscdwubvczmddsnf46uytyfvrbdhkjzztvsz6ruly
```
The published record should be visible in the console.
@@ -1,4 +1,4 @@
version: "1.1" version: "1.0"
name: fixturenet-laconic-loaded name: fixturenet-laconic-loaded
description: "A full featured laconic fixturenet" description: "A full featured laconic fixturenet"
repos: repos:
@@ -28,5 +28,3 @@ pods:
config: config:
cli: cli:
key: laconicd.mykey key: laconicd.mykey
address: laconicd.myaddress
@@ -16,4 +16,3 @@ pods:
config: config:
cli: cli:
key: laconicd.mykey key: laconicd.mykey
address: laconicd.myaddress
@@ -10,8 +10,6 @@ Clone required repositories:
```bash ```bash
laconic-so --stack fixturenet-optimism setup-repositories laconic-so --stack fixturenet-optimism setup-repositories
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
``` ```
Checkout to the required versions and branches in repos: Checkout to the required versions and branches in repos:
@@ -111,7 +109,7 @@ docker volume rm $(docker volume ls -q --filter "name=.*fixturenet_geth_accounts
docker volume rm $(docker volume ls -q --filter name=l2_geth_data) docker volume rm $(docker volume ls -q --filter name=l2_geth_data)
``` ```
* Re-run the deployment command used in [Deploy](#deploy) to restart the stopped containers * Reuse the deployment command used in [Deploy](#deploy) to restart the stopped containers
## Known Issues ## Known Issues
+6 -21
View File
@@ -10,8 +10,6 @@ Clone required repositories:
```bash ```bash
laconic-so --stack fixturenet-optimism setup-repositories --exclude cerc-io/go-ethereum laconic-so --stack fixturenet-optimism setup-repositories --exclude cerc-io/go-ethereum
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
``` ```
Checkout to the required versions and branches in repos: Checkout to the required versions and branches in repos:
@@ -37,29 +35,16 @@ This should create the required docker images in the local image registry:
## Deploy ## Deploy
Create and update an env file to be used in the next step ([defaults](../../config/fixturenet-optimism/l1-params.env)): Update the [l1-params.env](../../config/fixturenet-optimism/l1-params.env) file with L1 endpoint (`L1_RPC`, `L1_HOST` and `L1_PORT`) and other params
```bash * NOTE:
# External L1 endpoint * Stack Orchestrator needs to be run in [`dev`](/docs/CONTRIBUTING.md#install-developer-mode) mode to be able to edit the env file
CERC_L1_CHAIN_ID= * If L1 is running on the host machine, use `host.docker.internal` as the hostname to access the host port
CERC_L1_RPC=
CERC_L1_HOST=
CERC_L1_PORT=
# Credentials for accounts on L1 to send balance to Optimism Proxy contract from
# (enables them to do transactions on L2)
CERC_L1_ADDRESS=
CERC_L1_PRIV_KEY=
CERC_L1_ADDRESS_2=
CERC_L1_PRIV_KEY_2=
```
* NOTE: If L1 is running on the host machine, use `host.docker.internal` as the hostname to access the host port
Deploy the stack: Deploy the stack:
```bash ```bash
laconic-so --stack fixturenet-optimism deploy --include fixturenet-optimism --env-file <PATH_TO_ENV_FILE> up laconic-so --stack fixturenet-optimism deploy up --include fixturenet-optimism
``` ```
The `fixturenet-optimism-contracts` service may take a while (`~15 mins`) to complete running as it: The `fixturenet-optimism-contracts` service may take a while (`~15 mins`) to complete running as it:
@@ -84,7 +69,7 @@ docker logs -f <CONTAINER_ID>
Stop all services running in the background: Stop all services running in the background:
```bash ```bash
laconic-so --stack fixturenet-optimism deploy --include fixturenet-optimism down laconic-so --stack fixturenet-optimism deploy down --include fixturenet-optimism
``` ```
Clear volumes created by this stack: Clear volumes created by this stack:
+3 -5
View File
@@ -1,12 +1,10 @@
# MobyMask v2 watcher # MobyMask v2 watcher
Instructions to setup and deploy an end-to-end MobyMask v2 stack ([L1](../fixturenet-eth/) + [L2](../fixturenet-optimism/) chains + watcher + web-app(s)) using [laconic-stack-orchestrator](/README.md#install) Instructions to setup and deploy an end-to-end MobyMask v2 stack ([L1](../fixturenet-eth/) + [L2](../fixturenet-optimism/) chains + watcher) using [laconic-stack-orchestrator](/README.md#install)
We support running just the watcher part of stack, given an external L2 Optimism endpoint. We support running just the watcher part of stack, given an external L2 Optimism endpoint.
Follow [mobymask-only](./mobymask-only.md) for the same. Follow [mobymask-only](./mobymask-only.md) for the same.
We also support running just the web-app(s), given external watcher GQL (for mobymask-app) and relay node endpoints. Follow [web-apps.md](./web-apps.md) for the same.
## Setup ## Setup
Clone required repositories: Clone required repositories:
@@ -122,8 +120,8 @@ Clear volumes created by this stack:
```bash ```bash
# List all relevant volumes # List all relevant volumes
docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*peers_ids|.*mobymask_deployment|.*fixturenet_geth_accounts|.*l1_deployment|.*l2_accounts|.*l2_config|.*l2_geth_data" docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*mobymask_deployment|.*fixturenet_geth_accounts|.*l1_deployment|.*l2_accounts|.*l2_config|.*l2_geth_data"
# Remove all the listed volumes # Remove all the listed volumes
docker volume rm $(docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*peers_ids|.*mobymask_deployment|.*fixturenet_geth_accounts|.*l1_deployment|.*l2_accounts|.*l2_config|.*l2_geth_data") docker volume rm $(docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*mobymask_deployment|.*fixturenet_geth_accounts|.*l1_deployment|.*l2_accounts|.*l2_config|.*l2_geth_data")
``` ```
+11 -50
View File
@@ -10,8 +10,6 @@ Clone required repositories:
```bash ```bash
laconic-so --stack mobymask-v2 setup-repositories --include cerc-io/MobyMask,cerc-io/watcher-ts laconic-so --stack mobymask-v2 setup-repositories --include cerc-io/MobyMask,cerc-io/watcher-ts
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
``` ```
Checkout to the required versions and branches in repos: Checkout to the required versions and branches in repos:
@@ -38,44 +36,19 @@ This should create the required docker images in the local image registry
### Configuration ### Configuration
Create and update an env file to be used in the next step ([defaults](../../config/watcher-mobymask-v2/)): * In [mobymask-params.env](../../config/watcher-mobymask-v2/mobymask-params.env) file set `DEPLOYED_CONTRACT` to existing deployed mobymask contract address
* Setting `DEPLOYED_CONTRACT` will skip contract deployment when running stack
```bash * `ENABLE_PEER_L2_TXS` is used to enable/disable sending txs to L2 chain from watcher peer.
# External L2 endpoints * Update the [optimism-params.env](../../config/watcher-mobymask-v2/optimism-params.env) file with Optimism endpoints and other params for the Optimism running separately
CERC_L2_GETH_RPC= * `PRIVATE_KEY_PEER` is used by watcher peer to send txs to L2 chain
CERC_L2_GETH_HOST= * NOTE:
CERC_L2_GETH_PORT= * Stack Orchestrator needs to be run in [`dev`](/docs/CONTRIBUTING.md#install-developer-mode) mode to be able to edit the env file
* If Optimism is running on the host machine, use `host.docker.internal` as the hostname to access the host port
CERC_L2_NODE_HOST=
CERC_L2_NODE_PORT=
# Credentials for accounts to perform txs on L2
CERC_PRIVATE_KEY_DEPLOYER=
CERC_PRIVATE_KEY_PEER=
# Base URI for mobymask-app
# (used for generating a root invite link after deploying the contract)
CERC_MOBYMASK_APP_BASE_URI="http://127.0.0.1:3002/#"
# (Optional) Set of relay peers to connect to from the relay node
CERC_RELAY_PEERS=[]
# (Optional) Domain to be used in the relay node's announce address
CERC_RELAY_ANNOUNCE_DOMAIN=
# Set to false for disabling watcher peer to send txs to L2
CERC_ENABLE_PEER_L2_TXS=true
# (Optional) Set already deployed MobyMask contract address to avoid deploying contract in the stack
CERC_DEPLOYED_CONTRACT=
```
* NOTE: If Optimism is running on the host machine, use `host.docker.internal` as the hostname to access the host port
### Deploy the stack ### Deploy the stack
```bash ```bash
laconic-so --stack mobymask-v2 deploy --include watcher-mobymask-v2 --env-file <PATH_TO_ENV_FILE> up laconic-so --stack mobymask-v2 deploy --include watcher-mobymask-v2 up
``` ```
To list down and monitor the running containers: To list down and monitor the running containers:
@@ -90,22 +63,10 @@ docker ps
docker logs -f <CONTAINER_ID> docker logs -f <CONTAINER_ID>
``` ```
The watcher endpoint is exposed on host port `3001` and the relay node endpoint is exposed on host port `9090`
Check the logs of the deployment container to get the deployed contract's address and generated root invite link:
```bash
docker logs -f $(docker ps -aq --filter name="mobymask-1")
```
## Tests ## Tests
See [Tests](./README.md#tests) See [Tests](./README.md#tests)
## Web Apps
For deploying the web-app(s) separately after deploying the watcher, follow [web-apps.md](./web-apps.md)
## Clean up ## Clean up
Stop all services running in the background: Stop all services running in the background:
@@ -118,8 +79,8 @@ Clear volumes created by this stack:
```bash ```bash
# List all relevant volumes # List all relevant volumes
docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*peers_ids|.*mobymask_deployment|.*fixturenet_geth_accounts" docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*mobymask_deployment|.*fixturenet_geth_accounts"
# Remove all the listed volumes # Remove all the listed volumes
docker volume rm $(docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*peers_ids|.*mobymask_deployment|.*fixturenet_geth_accounts") docker volume rm $(docker volume ls -q --filter "name=.*mobymask_watcher_db_data|.*mobymask_deployment|.*fixturenet_geth_accounts")
``` ```
+12 -41
View File
@@ -10,8 +10,6 @@ Clone required repositories:
```bash ```bash
laconic-so --stack mobymask-v2 setup-repositories --include cerc-io/react-peer,cerc-io/mobymask-ui laconic-so --stack mobymask-v2 setup-repositories --include cerc-io/react-peer,cerc-io/mobymask-ui
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command
``` ```
Checkout to the required versions and branches in repos: Checkout to the required versions and branches in repos:
@@ -38,63 +36,36 @@ This should create the required docker images in the local image registry
### Configuration ### Configuration
Create and update an env file to be used in the next step ([defaults](../../config/watcher-mobymask-v2/mobymask-params.env)): * Update the [mobymask-params.env](../../config/watcher-mobymask-v2/mobymask-params.env) file with watcher endpoints and other params required by the web-apps
* `WATCHER_HOST` and `WATCHER_PORT` is used to check if watcher is up before building and deploying mobymask-app
```bash * `APP_WATCHER_URL` is used by mobymask-app to make GQL queries
# Set of relay nodes to be used by the web-app * `DEPLOYED_CONTRACT` and `CHAIN_ID` is used by mobymask-app in app config when creating messgaes for L2 txs
# (use double quotes " for strings) * `RELAY_NODES` is used by the web-apps to connect to the relay nodes (run in watcher)
# Eg. CERC_RELAY_NODES=["/dns4/example.com/tcp/443/wss/p2p/12D3KooWGHmDDCc93XUWL16FMcTPCGu2zFaMkf67k8HZ4gdQbRDr"] * NOTE:
CERC_RELAY_NODES=[] * Stack Orchestrator needs to be run in [`dev`](/docs/CONTRIBUTING.md#install-developer-mode) mode to be able to edit the env file
* If watcher is running on the host machine, use `host.docker.internal` as the hostname to access the host port
# Also add if running MobyMask app:
# External watcher endpoint (to check if watcher is up)
CERC_WATCHER_HOST=
CERC_WATCHER_PORT=
# Watcher endpoint used by the app for GQL queries
CERC_APP_WATCHER_URL="http://127.0.0.1:3001"
# Set deployed MobyMask contract address to be used in MobyMask app's config
CERC_DEPLOYED_CONTRACT=
# L2 Chain ID used by mobymask web-app for L2 txs
CERC_CHAIN_ID=42069
```
* NOTE: If watcher is running on the host machine, use `host.docker.internal` as the hostname to access the host port
### Deploy the stack ### Deploy the stack
For running mobymask-app For running mobymask-app
```bash ```bash
laconic-so --stack mobymask-v2 deploy --include mobymask-app --env-file <PATH_TO_ENV_FILE> up laconic-so --stack mobymask-v2 deploy --include mobymask-app up
# Runs on host port 3002
``` ```
For running peer-test-app For running peer-test-app
```bash ```bash
laconic-so --stack mobymask-v2 deploy --include peer-test-app --env-file <PATH_TO_ENV_FILE> up laconic-so --stack mobymask-v2 deploy --include peer-test-app up
# Runs on host port 3003
``` ```
To list down and monitor the running containers: To list down and monitor the running containers:
```bash ```bash
laconic-so --stack mobymask-v2 deploy --include [mobymask-app | peer-test-app] ps
docker ps docker ps
# Check logs for a container # Check logs for a container
docker logs -f <CONTAINER_ID> docker logs -f <CONTAINER_ID>
``` ```
## Demo
Follow the [demo](./demo.md) to try out the MobyMask app with L2 chain
## Clean up ## Clean up
Stop all services running in the background: Stop all services running in the background:
@@ -113,8 +84,8 @@ Clear volumes created by this stack:
```bash ```bash
# List all relevant volumes # List all relevant volumes
docker volume ls -q --filter "name=.*mobymask_deployment|.*peers_ids" docker volume ls -q --filter "name=.*mobymask_deployment"
# Remove all the listed volumes # Remove all the listed volumes
docker volume rm $(docker volume ls -q --filter "name=.*mobymask_deployment|.*peers_ids") docker volume rm $(docker volume ls -q --filter "name=.*mobymask_deployment")
``` ```
+2 -3
View File
@@ -32,12 +32,11 @@ from .util import include_exclude_check, get_parsed_stack_config
@click.command() @click.command()
@click.option("--include", help="only start these components") @click.option("--include", help="only start these components")
@click.option("--exclude", help="don\'t start these components") @click.option("--exclude", help="don\'t start these components")
@click.option("--env-file", help="env file to be used")
@click.option("--cluster", help="specify a non-default cluster name") @click.option("--cluster", help="specify a non-default cluster name")
@click.argument('command', required=True) # help: command: up|down|ps @click.argument('command', required=True) # help: command: up|down|ps
@click.argument('extra_args', nargs=-1) # help: command: up|down|ps <service1> <service2> @click.argument('extra_args', nargs=-1) # help: command: up|down|ps <service1> <service2>
@click.pass_context @click.pass_context
def command(ctx, include, exclude, env_file, cluster, command, extra_args): def command(ctx, include, exclude, cluster, command, extra_args):
'''deploy a stack''' '''deploy a stack'''
# TODO: implement option exclusion and command value constraint lost with the move from argparse to click # TODO: implement option exclusion and command value constraint lost with the move from argparse to click
@@ -52,7 +51,7 @@ def command(ctx, include, exclude, env_file, cluster, command, extra_args):
cluster_context = _make_cluster_context(ctx.obj, include, exclude, cluster) cluster_context = _make_cluster_context(ctx.obj, include, exclude, cluster)
# See: https://gabrieldemarmiesse.github.io/python-on-whales/sub-commands/compose/ # See: https://gabrieldemarmiesse.github.io/python-on-whales/sub-commands/compose/
docker = DockerClient(compose_files=cluster_context.compose_files, compose_project_name=cluster_context.cluster, compose_env_file=env_file) docker = DockerClient(compose_files=cluster_context.compose_files, compose_project_name=cluster_context.cluster)
extra_args_list = list(extra_args) or None extra_args_list = list(extra_args) or None
+1 -3
View File
@@ -34,9 +34,7 @@ In addition to the pre-requisites listed in the [README](/README.md), the follow
$ cd stack-orchestrator $ cd stack-orchestrator
``` ```
3. (This and the next step can be done by running `source ./scripts/developer-mode-setup.sh`) 3. Create and activate a venv:
Create and activate a venv:
``` ```
$ python3 -m venv venv $ python3 -m venv venv
$ source ./venv/bin/activate $ source ./venv/bin/activate
-64
View File
@@ -1,67 +1,3 @@
# laconic-so # laconic-so
Sub-commands and flags Sub-commands and flags
## setup-repositories
Clone a single repository:
```
$ laconic-so setup-repositories --include cerc-io/go-ethereum
```
Clone the repositories for a stack:
```
$ laconic-so --stack fixturenet-eth setup-repositories
```
Pull latest commits from origin:
```
$ laconic-so --stack fixturenet-eth setup-repositories --pull
```
Use SSH rather than https:
```
$ laconic-so --stack fixturenet-eth setup-repositories --git-ssh
```
## build-containers
Build a single container:
```
$ laconic-so build-containers --include <container-name>
```
e.g.
```
$ laconic-so build-containers --include cerc/go-ethereum
```
Build the containers for a stack:
```
$ laconic-so --stack <stack-name> build-containers
```
e.g.
```
$ laconic-so --stack fixturenet-eth build-containers
```
Force full rebuild of container images:
```
$ laconic-so build-containers --include <container-name> --force-rebuild
```
## build-npms
Build a single package:
```
$ laconic-so build-npms --include <package-name>
```
e.g.
```
$ laconic-so build-npms --include laconic-sdk
```
Build the packages for a stack:
```
$ laconic-so --stack <stack-name> build-npms
```
e.g.
```
$ laconic-so --stack fixturenet-laconicd build-npms
```
Force full rebuild of packages:
```
$ laconic-so build-npms --include <package-name> --force-rebuild
```
-2
View File
@@ -1,7 +1,5 @@
# Specification # Specification
(note this page is out of date)
## Implementation ## Implementation
+1 -1
View File
@@ -60,7 +60,7 @@ sudo apt -y install jq
# laconic-so depends on git # laconic-so depends on git
sudo apt -y install git sudo apt -y install git
# curl used below # curl used below
sudo apt -y install curl sudo apt -y install jq
# docker repo add depends on gnupg and updated ca-certificates # docker repo add depends on gnupg and updated ca-certificates
sudo apt -y install ca-certificates gnupg sudo apt -y install ca-certificates gnupg