diff --git a/CHANGELOG.md b/CHANGELOG.md index c5a3391a..c6dfffe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.6.7 +- Fixed #142 Negative value for address detected in the running testnet + ## 0.6.6 - Fixed RVM.getRandomMilestone: returns null if round has empty set - Fixed for RVM.delete: if round is deleted from DB, it's removed from cache diff --git a/DOCKER.md b/DOCKER.md index ea39c65f..708f0182 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -15,7 +15,7 @@ The provided dockerfile only contains the bare minimum of configuration paramete 2. build: installs Maven on top of the java stage and compiles Helix 3. final container: copies the helix jar file using the java stage as base -The built container assumes the WORKDIR inside the container is /helix/data: this means that the database directory will be written inside that directory by default. If a system administrator wants to retain the database across restarts, it is his/her job to mount a docker volume in the right folder +The built container assumes the WORKDIR inside the container is `/pendulum/data`: this means that the database directory will be written inside that directory by default. If a system administrator wants to retain the database across restarts, it is his/her job to mount a docker volume in the right folder ## Getting Started @@ -41,10 +41,10 @@ You can also pass more command line options to the docker run command and those ### Load options from INI -If you want to use a ``.ini file with the docker container, supposing it's stored under /path/to/conf/``.ini on your docker host, then pass -v /path/to/conf:/helix/conf and add -c /helix/conf/``.ini as docker run arguments. So for example the docker run command above would become: +If you want to use a ``.ini file with the docker container, supposing it's stored under /path/to/conf/``.ini on your docker host, then pass -v /path/to/conf:/pendulum/conf and add -c /pendulum/conf/``.ini as docker run arguments. So for example the docker run command above would become: ```shell -docker run -v /path/to/conf:/helix/conf -v /path/to/data:/helix/data helixnetwork/helix:latest -p 8085 -c /helix/conf/.ini +docker run -v /path/to/conf:/pendulum/conf -v /path/to/data:/helix/data helixnetwork/node:latest -p 8085 -c /pendulum/conf/.ini ``` ## Security diff --git a/Dockerfile b/Dockerfile index e4daffa6..eeb99d8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,13 @@ FROM helixnetwork/base16.04:latest as builder LABEL maintainer="dt@hlx.ai" WORKDIR /pendulum -COPY . /pendulum +# cache all deps Maven +COPY pom.xml . +RUN mvn dependency:go-offline + +# copy src files only for better caching +COPY checkstyle.xml . +COPY ./src /pendulum/src RUN mvn clean package FROM openjdk:jre-slim @@ -50,4 +56,4 @@ ENV JAVA_OPTIONS="-XX:+UnlockExperimentalVMOptions -XX:+DisableAttachMechanism - DOCKER_JAVA_NET_PREFER_IPV4_STACK=true WORKDIR /pendulum/data -ENTRYPOINT [ "/entrypoint.sh" ] \ No newline at end of file +ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/README.md b/README.md index 80cdb0bc..05329933 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ # Pendulum Pendulum is a quorum based [Tangle](https://github.com/iotaledger/iri/) implementation designed towards reliable timekeeping and messaging. -- **Latest release:** 0.6.6 pre-release +- **Latest release:** 0.6.7 pre-release - **License:** GPLv3 Special thanks to all of the [IOTA Contributors](https://github.com/iotaledger/iri/graphs/contributors)! diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 891e67ce..4d67b92e 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,14 +1,14 @@ #!/bin/bash # See Dockerfile and DOCKER.md for further info -if [ "${DOCKER_HLX_MONITORING_API_PORT_ENABLE}" == "1" ]; then - nohup socat -lm TCP-LISTEN:8086,fork TCP:127.0.0.1:${DOCKER_HLX_MONITORING_API_PORT_DESTINATION} & +if [ "${DOCKER_PLM_MONITORING_API_PORT_ENABLE}" == "1" ]; then + nohup socat -lm TCP-LISTEN:8086,fork TCP:127.0.0.1:${DOCKER_PLM_MONITORING_API_PORT_DESTINATION} & fi -HLX_JAR_FILE=$(find "$DOCKER_HLX_JAR_PATH" -type f -name "$DOCKER_HLX_JAR_FILE" -print -quit) -if [[ "${HLX_JAR_FILE}x" == "x" ]] +PLM_JAR_FILE=$(find "$DOCKER_PLM_JAR_PATH" -type f -name "$DOCKER_PLM_JAR_FILE" -print -quit) +if [[ "${PLM_JAR_FILE}x" == "x" ]] then - >&2 echo "ERROR: File '$DOCKER_HLX_JAR_FILE' not found in path '$DOCKER_HLX_JAR_PATH'" + >&2 echo "ERROR: File '$DOCKER_PLM_JAR_FILE' not found in path '$DOCKER_PLM_JAR_PATH'" exit 1 fi @@ -17,7 +17,7 @@ exec java \ -Xms$JAVA_MIN_MEMORY \ -Xmx$JAVA_MAX_MEMORY \ -Djava.net.preferIPv4Stack="$DOCKER_JAVA_NET_PREFER_IPV4_STACK" \ - -DLogging-Level="$DOCKER_HLX_LOGGING_LEVEL" \ - -jar "$HLX_JAR_FILE" \ - --remote "$DOCKER_HLX_REMOTE" --remote-limit-api "$DOCKER_HLX_REMOTE_LIMIT_API" \ - "$@" \ No newline at end of file + -DLogging-Level="$DOCKER_PLM_LOGGING_LEVEL" \ + -jar "$PLM_JAR_FILE" \ + --remote "$DOCKER_PLM_REMOTE" --remote-limit-api "$DOCKER_PLM_REMOTE_LIMIT_API" \ + "$@" diff --git a/pom.xml b/pom.xml index caeae423..f3450868 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ net.pendulum pendulum - 0.6.6 + 0.6.7 Pendulum Pendulum Protocol diff --git a/src/main/java/net/helix/pendulum/Main.java b/src/main/java/net/helix/pendulum/Main.java index 0e324a8a..48b25389 100644 --- a/src/main/java/net/helix/pendulum/Main.java +++ b/src/main/java/net/helix/pendulum/Main.java @@ -45,7 +45,7 @@ public class Main { public static final String MAINNET_NAME = "Pendulum"; public static final String TESTNET_NAME = "Pendulum Testnet"; - public static final String VERSION = "0.6.6"; + public static final String VERSION = "0.6.7"; /** * The entry point of Pendulum. diff --git a/src/main/java/net/helix/pendulum/service/API.java b/src/main/java/net/helix/pendulum/service/API.java index 2ada9a46..167e3227 100644 --- a/src/main/java/net/helix/pendulum/service/API.java +++ b/src/main/java/net/helix/pendulum/service/API.java @@ -1592,6 +1592,9 @@ private List getConfirmedTips() throws Exception { BundleValidator.validate(tangle, snapshotProvider.getInitialSnapshot(), txVM.getHash()).size() != 0) { if (walkValidator.isValid(transaction)) { confirmedTips.add(transaction); + } else { + log.warn("Inconsistent transaction has been removed from tips: " + transaction.toString()); + tipsViewModel.removeTipHash(transaction); } } } @@ -1769,7 +1772,7 @@ private Function, AbstractResponse> storeTransactions() { storeTransactionsStatement(txString); } catch (Exception e) { //transaction not valid - return ErrorResponse.create("Invalid bytes input"); + return ErrorResponse.create("Invalid bytes input. " + e.getMessage()); } return AbstractResponse.createEmptyResponse(); };