-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: blockchain and p2p fixes to be able to launch a network (#3619)
- Loading branch information
Showing
39 changed files
with
906 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Ark Core End-to-end Testing | ||
|
||
<p align="center"> | ||
<img src="./img/core-e2e-banner.png" /> | ||
</p> | ||
|
||
[![License: MIT](https://badgen.now.sh/badge/license/MIT/green)](./LICENSE) | ||
|
||
## Introduction | ||
|
||
E2E tests have not been enabled yet for v3, but you can still launch a network (see below). | ||
|
||
## Install and run | ||
|
||
You can launch and stop a network like this : | ||
|
||
```bash | ||
cd lib/config | ||
docker-compose up -d # launches the network | ||
docker-compose down -v # shuts down the network | ||
``` | ||
|
||
This will launch a network of 5 nodes on testnet. | ||
|
||
You can see the live output of the nodes by using the docker logs command : | ||
|
||
```bash | ||
docker logs config_core0_1 -f # for the first node (core0) | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
version: '2.2' | ||
services: | ||
peerdiscovery: | ||
build: ./peer-discovery | ||
image: peerdiscovery | ||
nginx: | ||
image: nginx:latest | ||
volumes: | ||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf | ||
ports: | ||
- 4900:4900 | ||
|
||
postgres0: &postgresServiceDefinition | ||
image: "postgres:alpine" | ||
environment: | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: ark_testnet | ||
POSTGRES_USER: ark | ||
postgres1: *postgresServiceDefinition | ||
postgres2: *postgresServiceDefinition | ||
postgres3: *postgresServiceDefinition | ||
postgres4: *postgresServiceDefinition | ||
|
||
core0: &coreServiceDefinition | ||
build: ./nodes | ||
image: core | ||
volumes: | ||
- ./../../../../:/core | ||
depends_on: | ||
- postgres1 | ||
- peerdiscovery | ||
command: | ||
- /bin/sh | ||
- -c | ||
- /core/packages/core/bin/run core:run --network=testnet --version=3.0.0 | ||
environment: &coreEnvironment | ||
CORE_DB_HOST: postgres0 | ||
CORE_DB_DATABASE: ark_testnet | ||
CORE_DB_USERNAME: ark | ||
CORE_PATH_CONFIG: /core/__tests__/e2e/lib/config/nodes/core0 | ||
CORE_PATH_DATA: /core/__tests__/e2e/lib/config/nodes/core0 | ||
|
||
core1: | ||
<<: *coreServiceDefinition | ||
depends_on: | ||
- postgres1 | ||
- peerdiscovery | ||
environment: | ||
<<: *coreEnvironment | ||
CORE_DB_HOST: postgres1 | ||
CORE_PATH_CONFIG: /core/__tests__/e2e/lib/config/nodes/core1 | ||
CORE_PATH_DATA: /core/__tests__/e2e/lib/config/nodes/core1 | ||
|
||
core2: | ||
<<: *coreServiceDefinition | ||
depends_on: | ||
- postgres2 | ||
- peerdiscovery | ||
environment: | ||
<<: *coreEnvironment | ||
CORE_DB_HOST: postgres2 | ||
CORE_PATH_CONFIG: /core/__tests__/e2e/lib/config/nodes/core2 | ||
CORE_PATH_DATA: /core/__tests__/e2e/lib/config/nodes/core2 | ||
|
||
core3: | ||
<<: *coreServiceDefinition | ||
depends_on: | ||
- postgres3 | ||
- peerdiscovery | ||
environment: | ||
<<: *coreEnvironment | ||
CORE_DB_HOST: postgres3 | ||
CORE_PATH_CONFIG: /core/__tests__/e2e/lib/config/nodes/core3 | ||
CORE_PATH_DATA: /core/__tests__/e2e/lib/config/nodes/core3 | ||
|
||
core4: | ||
<<: *coreServiceDefinition | ||
depends_on: | ||
- postgres4 | ||
- peerdiscovery | ||
environment: | ||
<<: *coreEnvironment | ||
CORE_DB_HOST: postgres4 | ||
CORE_PATH_CONFIG: /core/__tests__/e2e/lib/config/nodes/core4 | ||
CORE_PATH_DATA: /core/__tests__/e2e/lib/config/nodes/core4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
events { | ||
worker_connections 4096; ## Default: 1024 | ||
} | ||
http { | ||
server { | ||
listen 4900; | ||
|
||
location ~ /core(\d+)(.*)$ { | ||
resolver 127.0.0.11; | ||
proxy_pass http://core$1:4003$2; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM telus/build-essential | ||
FROM python | ||
FROM node:12.13 | ||
|
||
WORKDIR /ark-core | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
CORE_P2P_PEER_VERIFIER_DEBUG_EXTRA=true | ||
CORE_LOG_LEVEL=emergency | ||
CORE_LOG_LEVEL_FILE=trace | ||
|
||
CORE_DB_PORT=5432 | ||
|
||
CORE_P2P_HOST=0.0.0.0 | ||
CORE_P2P_PORT=4000 | ||
|
||
CORE_WEBHOOKS_HOST=0.0.0.0 | ||
CORE_WEBHOOKS_PORT=4004 | ||
|
||
CORE_EXCHANGE_JSON_RPC_HOST=0.0.0.0 | ||
CORE_EXCHANGE_JSON_RPC_PORT=8080 | ||
|
||
CORE_API_HOST=0.0.0.0 | ||
CORE_API_PORT=4003 | ||
|
||
CORE_WALLET_API_HOST=0.0.0.0 | ||
CORE_WALLET_API_PORT=4040 |
Oops, something went wrong.