This commit is contained in:
poma 2020-10-03 10:02:38 +03:00
parent 00e17b1687
commit 5328178d65
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657
4 changed files with 24 additions and 22 deletions

View File

@ -1,10 +1,11 @@
FROM node:12 FROM node:12
WORKDIR /app WORKDIR /app
COPY package.json package-lock.json ./ COPY package.json yarn.lock ./
RUN npm install && npm cache clean --force RUN yarn && yarn cache clean --force
COPY . . COPY . .
EXPOSE 8000 EXPOSE 8000
HEALTHCHECK CMD curl -f http://localhost:8000/status # HEALTHCHECK CMD curl -f http://localhost:8000/status
CMD ["npm", "run", "start"] ENTRYPOINT ["yarn"]
CMD ["server"]

View File

@ -4,6 +4,7 @@ services:
kovan: kovan:
image: tornadocash/relayer image: tornadocash/relayer
restart: always restart: always
command: server
environment: environment:
VIRTUAL_HOST: example.duckdns.org VIRTUAL_HOST: example.duckdns.org
LETSENCRYPT_HOST: example.duckdns.org LETSENCRYPT_HOST: example.duckdns.org
@ -20,24 +21,26 @@ services:
depends_on: depends_on:
- redis - redis
mainnet: tree-monitor:
image: tornadocash/relayer image: tornadocash/relayer
restart: always restart: always
command: tree-monitor
environment: environment:
VIRTUAL_HOST: example2.duckdns.org qwe: ads
LETSENCRYPT_HOST: example2.duckdns.org
NET_ID: 1 worker1:
RPC_URL: https://mainnet.infura.io image: tornadocash/relayer
# ORACLE_RPC_URL should always point to the mainnet restart: always
ORACLE_RPC_URL: https://mainnet.infura.io command: worker
# without 0x prefix environment:
PRIVATE_KEY: PRIVATE_KEY: qwe
# 2.5 means 2.5%
RELAYER_FEE: 2.5 worker2:
REDIS_URL: redis://redis/1 image: tornadocash/relayer
nginx_proxy_read_timeout: 600 restart: always
depends_on: command: worker
- redis environment:
PRIVATE_KEY: qwe
redis: redis:
image: redis image: redis

View File

@ -24,14 +24,12 @@
"gas-price-oracle": "^0.1.5", "gas-price-oracle": "^0.1.5",
"ioredis": "^4.14.1", "ioredis": "^4.14.1",
"node-fetch": "^2.6.0", "node-fetch": "^2.6.0",
"snarkjs": "git+https://github.com/tornadocash/snarkjs.git#869181cfaf7526fe8972073d31655493a04326d5",
"tornado-cash-anonymity-mining": "git+https://github.com/tornadocash/tornado-anonymity-mining.git#e3ae8b98b14eb7fee7cb8c93221920a20b1e0cd8", "tornado-cash-anonymity-mining": "git+https://github.com/tornadocash/tornado-anonymity-mining.git#e3ae8b98b14eb7fee7cb8c93221920a20b1e0cd8",
"tx-manager": "git+https://github.com/tornadocash/tx-manager.git#df118be318b007e597e157504d105dfa3e6322a1", "tx-manager": "git+https://github.com/tornadocash/tx-manager.git#df118be318b007e597e157504d105dfa3e6322a1",
"uuid": "^8.3.0", "uuid": "^8.3.0",
"web3": "^1.3.0", "web3": "^1.3.0",
"web3-core-promievent": "^1.3.0", "web3-core-promievent": "^1.3.0",
"web3-utils": "^1.2.2", "web3-utils": "^1.2.2",
"websnark": "git+https://github.com/tornadocash/websnark.git#86a526718cd6f6f5d31bdb1fe26a9ec8819f633e",
"why-is-node-running": "^2.2.0" "why-is-node-running": "^2.2.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -89,7 +89,7 @@ async function checkTornadoFee({ args, contract }) {
async function checkMiningFee({ args }) { async function checkMiningFee({ args }) {
const swap = new web3.eth.Contract(swapABI, swapAddress) const swap = new web3.eth.Contract(swapABI, swapAddress)
const TornAmount = await swap.getExpectedReturn(args.fee).call() const TornAmount = await swap.methods.getExpectedReturn(args.fee).call()
console.log('TornAmount', TornAmount) console.log('TornAmount', TornAmount)
// todo: use desired torn/eth rate and compute the same way as in tornado // todo: use desired torn/eth rate and compute the same way as in tornado