Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #163 from HelixNetwork/dev
Browse files Browse the repository at this point in the history
0.6.7
  • Loading branch information
oracle58 authored Sep 23, 2019
2 parents af0f91c + 3009f00 commit 38c0ca0
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 18 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 `<conf_name>`.ini file with the docker container, supposing it's stored under /path/to/conf/`<conf_name>`.ini on your docker host, then pass -v /path/to/conf:/helix/conf and add -c /helix/conf/`<conf_name>`.ini as docker run arguments. So for example the docker run command above would become:
If you want to use a `<conf_name>`.ini file with the docker container, supposing it's stored under /path/to/conf/`<conf_name>`.ini on your docker host, then pass -v /path/to/conf:/pendulum/conf and add -c /pendulum/conf/`<conf_name>`.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/<conf_name>.ini
docker run -v /path/to/conf:/pendulum/conf -v /path/to/data:/helix/data helixnetwork/node:latest -p 8085 -c /pendulum/conf/<conf_name>.ini
```

## Security
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ FROM helixnetwork/base16.04:latest as builder
LABEL maintainer="[email protected]"

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
Expand Down Expand Up @@ -50,4 +56,4 @@ ENV JAVA_OPTIONS="-XX:+UnlockExperimentalVMOptions -XX:+DisableAttachMechanism -
DOCKER_JAVA_NET_PREFER_IPV4_STACK=true

WORKDIR /pendulum/data
ENTRYPOINT [ "/entrypoint.sh" ]
ENTRYPOINT [ "/entrypoint.sh" ]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)!
Expand Down
18 changes: 9 additions & 9 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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" \
"$@"
-DLogging-Level="$DOCKER_PLM_LOGGING_LEVEL" \
-jar "$PLM_JAR_FILE" \
--remote "$DOCKER_PLM_REMOTE" --remote-limit-api "$DOCKER_PLM_REMOTE_LIMIT_API" \
"$@"
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>net.pendulum</groupId>
<artifactId>pendulum</artifactId>

<version>0.6.6</version>
<version>0.6.7</version>

<name>Pendulum</name>
<description>Pendulum Protocol</description>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/helix/pendulum/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/net/helix/pendulum/service/API.java
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,9 @@ private List<Hash> 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);
}
}
}
Expand Down Expand Up @@ -1769,7 +1772,7 @@ private Function<Map<String, Object>, 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();
};
Expand Down

0 comments on commit 38c0ca0

Please sign in to comment.