From f32b87c04fd97dd236bfd3a96cb42eb2a9a3b213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Neboj=C5=A1a=20Obradovi=C4=87?= Date: Thu, 22 Nov 2018 13:19:07 +0100 Subject: [PATCH 1/3] Suppress invalid output and validate wallet (#753) --- testnet/register-node.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/testnet/register-node.js b/testnet/register-node.js index ffa4c63114..ea32a726bd 100644 --- a/testnet/register-node.js +++ b/testnet/register-node.js @@ -35,14 +35,22 @@ function main() { externalConfig = JSON.parse(fs.readFileSync(localConfigPath, 'utf8')); } - if (!process.env.NODE_WALLET || !process.env.NODE_PRIVATE_KEY || - !web3.utils.isAddress(process.env.NODE_WALLET)) { - console.error('Wallet not provided! Please provide valid wallet.'); - } else { + // Check for old env variables for the sake of compatibility. + if (process.env.NODE_WALLET) { externalConfig.node_wallet = process.env.NODE_WALLET; + } + if (process.env.NODE_PRIVATE_KEY) { externalConfig.node_private_key = process.env.NODE_PRIVATE_KEY; } + if (!externalConfig.node_wallet || + !externalConfig.node_private_key || + !web3.utils.isAddress(externalConfig.node_wallet)) { + console.error('Wallet not provided! Please provide valid wallet.'); + process.exit(1); + return; + } + if (process.env.ERC_725_IDENTITY) { const erc725IdentityFilePath = path.join(localConfiguration.appDataPath, localConfiguration.erc725_identity_filepath); From b372599be3b8d131555938c9337014cab8758741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Neboj=C5=A1a=20Obradovi=C4=87?= Date: Thu, 22 Nov 2018 13:19:22 +0100 Subject: [PATCH 2/3] Fix arangodb default password issue (#752) --- Dockerfile | 1 - Dockerfile.development | 2 +- Dockerfile.mariner | 1 - Dockerfile.stable | 2 +- Dockerfile.staging | 2 +- config/config.json | 10 +++++----- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 27d45a4938..14295e16f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,6 @@ COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add files COPY . /ot-node -RUN echo '{ "database": { "password": "root" }}' > /ot-node/.origintrail_noderc RUN service arangodb3 start && cd /ot-node && npm install && npm run setup -- --configDir=/ot-node/data RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz diff --git a/Dockerfile.development b/Dockerfile.development index 784df856c6..07124a0c6b 100644 --- a/Dockerfile.development +++ b/Dockerfile.development @@ -5,6 +5,7 @@ LABEL maintainer="OriginTrail" ARG targetEnvironment=development ENV NODE_ENV=$targetEnvironment +ENV GRANAX_USE_SYSTEM_TOR=1 RUN apt-get -qq update && apt-get -qq -y install curl RUN curl -sL https://deb.nodesource.com/setup_9.x | bash - @@ -23,7 +24,6 @@ COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add files COPY . /ot-node -RUN echo '{ "database": { "password": "root" }}' > /ot-node/.origintrail_noderc RUN service arangodb3 start && cd /ot-node && npm install && npm run setup -- --configDir=/ot-node/data RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz diff --git a/Dockerfile.mariner b/Dockerfile.mariner index a7cda29a34..2e9c373a50 100644 --- a/Dockerfile.mariner +++ b/Dockerfile.mariner @@ -24,7 +24,6 @@ COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add files COPY . /ot-node -RUN echo '{ "database": { "password": "root" }}' > /ot-node/.origintrail_noderc RUN service arangodb3 start && cd /ot-node && npm install && npm run setup -- --configDir=/ot-node/data RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz diff --git a/Dockerfile.stable b/Dockerfile.stable index 7520ca90bb..fc379ace01 100644 --- a/Dockerfile.stable +++ b/Dockerfile.stable @@ -5,6 +5,7 @@ LABEL maintainer="OriginTrail" ARG targetEnvironment=stable ENV NODE_ENV=$targetEnvironment +ENV GRANAX_USE_SYSTEM_TOR=1 RUN apt-get -qq update && apt-get -qq -y install curl RUN curl -sL https://deb.nodesource.com/setup_9.x | bash - @@ -23,7 +24,6 @@ COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add files COPY . /ot-node -RUN echo '{ "database": { "password": "root" }}' > /ot-node/.origintrail_noderc RUN service arangodb3 start && cd /ot-node && npm install && npm run setup -- --configDir=/ot-node/data RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz diff --git a/Dockerfile.staging b/Dockerfile.staging index 4bb8cf0a70..f08591387a 100644 --- a/Dockerfile.staging +++ b/Dockerfile.staging @@ -5,6 +5,7 @@ LABEL maintainer="OriginTrail" ARG targetEnvironment=staging ENV NODE_ENV=$targetEnvironment +ENV GRANAX_USE_SYSTEM_TOR=1 RUN apt-get -qq update && apt-get -qq -y install curl RUN curl -sL https://deb.nodesource.com/setup_9.x | bash - @@ -23,7 +24,6 @@ COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add files COPY . /ot-node -RUN echo '{ "database": { "password": "root" }}' > /ot-node/.origintrail_noderc RUN service arangodb3 start && cd /ot-node && npm install && npm run setup -- --configDir=/ot-node/data RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz diff --git a/config/config.json b/config/config.json index 204da9c9b0..68472ae3ca 100644 --- a/config/config.json +++ b/config/config.json @@ -44,7 +44,7 @@ "database": { "provider": "arangodb", "username": "root", - "password": "", + "password": "root", "port": 8529, "database": "origintrail-develop", "host": "localhost", @@ -144,7 +144,7 @@ "database": { "provider": "arangodb", "username": "root", - "password": "", + "password": "root", "port": 8529, "database": "origintrail-staging", "host": "localhost", @@ -244,7 +244,7 @@ "database": { "provider": "arangodb", "username": "root", - "password": "", + "password": "root", "port": 8529, "database": "origintrail-stable", "host": "localhost", @@ -344,7 +344,7 @@ "database": { "provider": "arangodb", "username": "root", - "password": "", + "password": "root", "port": 8529, "database": "origintrail", "host": "localhost", @@ -447,7 +447,7 @@ "database": { "provider": "arangodb", "username": "root", - "password": "", + "password": "root", "port": 8529, "database": "origintrail", "host": "localhost", From ea21937757bee5cda54dc32573d282c5b1f4ef8a Mon Sep 17 00:00:00 2001 From: Nebojsa Obradovic Date: Thu, 22 Nov 2018 13:21:02 +0100 Subject: [PATCH 3/3] Version update to v2.0.24 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index b2ff2be398..4def57b8c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "2.0.23", + "version": "2.0.24", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d666143aea..a9e01fcfd8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "2.0.23", + "version": "2.0.24", "description": "OriginTrail node", "main": ".eslintrc.js", "config": {