Skip to content

Commit

Permalink
Merge pull request #315 from EYBlockchain/ilyas/remove-timber
Browse files Browse the repository at this point in the history
Remove timber container
  • Loading branch information
Westlad authored Nov 22, 2021
2 parents 88c4f42 + 045740c commit 572aea6
Show file tree
Hide file tree
Showing 64 changed files with 1 addition and 11,913 deletions.
3 changes: 0 additions & 3 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ module.exports = {
`ws://${process.env.BLOCKCHAIN_WS_HOST}:${process.env.BLOCKCHAIN_PORT}`,
USE_INFURA: process.env.USE_INFURA === 'true',
ETH_PRIVATE_KEY: process.env.ETH_PRIVATE_KEY,
TIMBER_HOST: process.env.TIMBER_HOST || 'timber',
TIMBER_PORT: process.env.TIMBER_PORT || 80,
OPTIMIST_HOST: process.env.OPTIMIST_HOST || 'optimist',
OPTIMIST_PORT: process.env.OPTIMIST_PORT || 80,
WEB3_OPTIONS: {
Expand Down Expand Up @@ -60,7 +58,6 @@ module.exports = {
BN128_GROUP_ORDER: 21888242871839275222246405745257275088548364400416034343698204186575808495617n,
BN128_PRIME_FIELD: 21888242871839275222246405745257275088696311157297823662689037894645226208583n,
TRANSACTIONS_PER_BLOCK: Number(process.env.TRANSACTIONS_PER_BLOCK) || 2,
TIMBER_SYNC_RETRIES: 5, // Sets amount of exponential backoff attempts to sync with timber.
PROPOSE_BLOCK_TYPES: [
'(uint48,address,bytes32,uint256,bytes32)',
'(uint64,uint64[2],uint8,uint8,bytes32,bytes32,bytes32,bytes32,bytes32[2],bytes32[2],bytes32[8],uint[4])[]',
Expand Down
108 changes: 0 additions & 108 deletions config/timber.js

This file was deleted.

12 changes: 0 additions & 12 deletions docker-compose.host.docker.internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,11 @@ services:
ETH_NETWORK: development
BLOCKCHAIN_WS_HOST: host.docker.internal

# Timber service, configured for nightfall
timber1:
environment:
BLOCKCHAIN_WS_HOST: host.docker.internal
AUTOSTART_RETRIES: 100

optimist1:
environment:
BLOCKCHAIN_WS_HOST: host.docker.internal
AUTOSTART_RETRIES: 100

timber2:
environment:
BLOCKCHAIN_WS_HOST: host.docker.internal
AUTOSTART_RETRIES: 100
# LOG_LEVEL: debug

optimist2:
environment:
BLOCKCHAIN_WS_HOST: host.docker.internal
Expand Down
109 changes: 0 additions & 109 deletions docker-compose.images.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ services:
depends_on:
- deployer
- worker
- timber1
- rabbitmq1
environment:
MONGO_INITDB_ROOT_USERNAME: admin
Expand All @@ -30,8 +29,6 @@ services:
ZOKRATES_WORKER_HOST: worker
RABBITMQ_HOST: amqp://rabbitmq1
RABBITMQ_PORT: 5672
TIMBER_HOST: timber1
TIMBER_PORT: 80
ENABLE_QUEUE: 1
OPTIMIST_HOST: optimist1
OPTIMIST_PORT: 80
Expand All @@ -52,7 +49,6 @@ services:
depends_on:
- deployer
- worker
- timber2
- rabbitmq2
environment:
MONGO_INITDB_ROOT_USERNAME: admin
Expand All @@ -63,8 +59,6 @@ services:
ZOKRATES_WORKER_HOST: worker
RABBITMQ_HOST: amqp://rabbitmq2
RABBITMQ_PORT: 5672
TIMBER_HOST: timber2
TIMBER_PORT: 80
ENABLE_QUEUE: 1
OPTIMIST_HOST: optimist2
OPTIMIST_PORT: 80
Expand Down Expand Up @@ -104,103 +98,8 @@ services:
BLOCKCHAIN_WS_HOST: blockchain1
BLOCKCHAIN_PORT: 8546
ZOKRATES_WORKER_HOST: worker
# TIMBER_HOST: timber1
# TIMBER_PORT: 80
USE_STUBS: 'false'

# Timber service, configured for nightfall
timber1:
build:
dockerfile: Dockerfile
context: ./timber
restart: on-failure
depends_on:
- deployer
- timber-database1
networks:
- nightfall_network
ports:
- 8083:80
volumes:
- type: volume
source: build
target: /app/build/
- type: bind
source: ./timber/src
target: /app/src/
- type: bind
source: ./config/timber.js
target: /app/config/default.js
- type: bind
source: ./timber/entrypoint.sh
target: /app/entrypoint.sh
environment:
BLOCKCHAIN_WS_HOST: blockchain1
BLOCKCHAIN_PORT: 8546
MONGO_HOST: timber-database1
MONGO_PORT: 27017
MONGO_NAME: merkle_tree
HASH_TYPE: mimc
LOG_LEVEL: info
AUTOSTART: enabled

# Timber service, configured for nightfall
timber2:
build:
dockerfile: Dockerfile
context: ./timber
restart: on-failure
depends_on:
- deployer
- timber-database2
networks:
- nightfall_network
ports:
- 8087:80
volumes:
- type: volume
source: build
target: /app/build/
- type: bind
source: ./timber/src
target: /app/src/
- type: bind
source: ./config/timber.js
target: /app/config/default.js
environment:
BLOCKCHAIN_WS_HOST: blockchain1
BLOCKCHAIN_PORT: 8546
MONGO_HOST: timber-database2
MONGO_PORT: 27017
MONGO_NAME: merkle_tree
HASH_TYPE: mimc
LOG_LEVEL: error
AUTOSTART: enabled

#The database storing the merkle tree
timber-database1:
image: mongo
environment:
- MONGO_INITDB_DATABASE=merkle_tree
volumes:
- type: volume
source: timber-database-volume1
target: /data/db
networks:
- nightfall_network

#The database storing the merkle tree
timber-database2:
image: mongo
environment:
- MONGO_INITDB_DATABASE=merkle_tree
volumes:
- type: volume
source: timber-database-volume2
target: /data/db
networks:
- nightfall_network

rabbitmq1:
image: rabbitmq
ports:
Expand All @@ -220,7 +119,6 @@ services:
optimist1:
image: ghcr.io/eyblockchain/nightfall3-optimist:latest
depends_on:
- timber1
- deployer
networks:
- nightfall_network
Expand All @@ -240,14 +138,11 @@ services:
LOG_LEVEL: debug
IS_CHALLENGER: 'true'
TRANSACTIONS_PER_BLOCK: ${TRANSACTIONS_PER_BLOCK:-2}
TIMBER_HOST: timber1
TIMBER_PORT: 80
command: ['npm', 'run', 'dev']

optimist2:
image: ghcr.io/eyblockchain/nightfall3-optimist:latest
depends_on:
- timber2
- deployer
networks:
- nightfall_network
Expand All @@ -268,17 +163,13 @@ services:
LOG_LEVEL: error
IS_CHALLENGER: 'true'
TRANSACTIONS_PER_BLOCK: ${TRANSACTIONS_PER_BLOCK:-2}
TIMBER_HOST: timber2
TIMBER_PORT: 80
command: ['npm', 'run', 'dev']

volumes:
mongodb1:
mongodb2:
proving_files:
build:
timber-database-volume1:
timber-database-volume2:

networks:
nightfall_network:
Expand Down
14 changes: 0 additions & 14 deletions docker-compose.testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,6 @@ services:
ETH_PRIVATE_KEY: $ETH_PRIVATE_KEY
INFURA_PROJECT_SECRET: $INFURA_PROJECT_SECRET

timber1:
environment:
BLOCKCHAIN_URL: 'wss://ropsten.infura.io/ws/v3/${INFURA_PROJECT_ID}'
USE_INFURA: 'true'
AUTOSTART_RETRIES: 500
INFURA_PROJECT_SECRET: $INFURA_PROJECT_SECRET

timber2:
environment:
BLOCKCHAIN_URL: 'wss://ropsten.infura.io/ws/v3/${INFURA_PROJECT_ID}'
USE_INFURA: 'true'
AUTOSTART_RETRIES: 500
INFURA_PROJECT_SECRET: $INFURA_PROJECT_SECRET

optimist1:
environment:
BLOCKCHAIN_URL: 'wss://ropsten.infura.io/ws/v3/${INFURA_PROJECT_ID}'
Expand Down
Loading

0 comments on commit 572aea6

Please sign in to comment.