forked from nanocurrency/nano-node
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge master into ublocks (nanocurrency#714)
* Fix typos (nanocurrency#683) * Move to C++14 Replaces a single reset with make_unique to see if things compile in CI. Also reverts a CI-specific RPATH change which prevented the wallet from running on macOS dev machines * Update CMakeLists.txt to support gtest linking for Windows * Fix test for wallet_create_max to allow for utx database addition (nanocurrency#691) * Remove unused code (nanocurrency#686) * Fix docker boost url * Revert nonWalletDbs Revert to fix failing tests * Improved error handling in message parser (nanocurrency#704) * Replacing bool get_optional with get default values (nanocurrency#670) * Revert "Watch only accounts" This reverts commit 1b0809a. * Replacing bool get_optional with get default values * RPC tests for optional bool values * RPC tests for wallet_ledger & wallet_add_watch * Improve account history RPC endpoint (nanocurrency#668) * Checking ledger::forked_block preconditions which were asserting. * Update README (nanocurrency#709) * update docs to add guides and update "what is nano?" system * add whitepaper to guides and docs * update features list * update what is nano header level * Build of Boost Cleanup (nanocurrency#707) * Updated to check the boost SHA256 when downloading * Fixed invalid shell option * Allow the user to request a minimal build of Boost * Ensure boost build script exits on error * Removed apparently unused "mkdir" * Docker altnets (nanocurrency#708) * Updated to check the boost SHA256 when downloading * Fixed invalid shell option * Allow the user to request a minimal build of Boost * Ensure boost build script exits on error * Removed apparently unused "mkdir" * Updated Docker build for node to support altnets * Allow user-supplied arguments to "docker build" * Updated Docker auto deploy to build a live and beta image for each tag * Print the correct image name when building the docker image * Corrected typo for the test network * Broadcasting active elections blocks to discovered representatives (nanocurrency#711) * Broadcasting active elections blocks * Improve formatting for clang * Connecting to rai-beta for beta network. * Specify beta network representatives (nanocurrency#712) * Update the beta network configuration (nanocurrency#713) * Specify beta network representatives * Update beta network genesis block * Use port 54000 for beta nodes * Add history RPC raw support to ublocks * Fix test for wallet_create_max to allow for utx database addition (nanocurrency#691)
- Loading branch information
1 parent
f5c462a
commit 755dae8
Showing
36 changed files
with
1,007 additions
and
456 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o unset | ||
set -o nounset | ||
set -o errexit | ||
set -o xtrace | ||
|
||
bootstrapArgs=() | ||
while getopts 'm' OPT; do | ||
case "${OPT}" in | ||
m) | ||
bootstrapArgs+=('--with-libraries=atomic,chrono,thread,log,date_time,filesystem,program_options,regex') | ||
;; | ||
esac | ||
done | ||
|
||
BOOST_BASENAME=boost_1_66_0 | ||
BOOST_ROOT=${BOOST_ROOT-/usr/local/boost} | ||
BOOST_URL=https://downloads.sourceforge.net/project/boost/boost/1.66.0/${BOOST_BASENAME}.tar.bz2 | ||
BOOST_ARCHIVE="${BOOST_BASENAME}.tar.bz2" | ||
BOOST_ARCHIVE_SHA256='5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9' | ||
|
||
wget --quiet -O "${BOOST_ARCHIVE}.new" "${BOOST_URL}" | ||
checkHash="$(openssl dgst -sha256 "${BOOST_ARCHIVE}.new" | sed 's@^.*= *@@')" | ||
if [ "${checkHash}" != "${BOOST_ARCHIVE_SHA256}" ]; then | ||
echo "Checksum mismatch. Expected ${BOOST_ARCHIVE_SHA256}, got ${checkHash}" >&2 | ||
|
||
exit 1 | ||
fi | ||
mv "${BOOST_ARCHIVE}.new" "${BOOST_ARCHIVE}" | ||
|
||
wget --quiet -O ${BOOST_BASENAME}.tar.gz "${BOOST_URL}" | ||
tar xf ${BOOST_BASENAME}.tar.gz | ||
tar xf "${BOOST_ARCHIVE}" | ||
cd ${BOOST_BASENAME} | ||
./bootstrap.sh | ||
./bootstrap.sh "${bootstrapArgs[@]}" | ||
./b2 -d0 --prefix=${BOOST_ROOT} link=static install | ||
cd .. | ||
rm -rf ${BOOST_BASENAME} | ||
rm -f ${BOOST_BASENAME}.tar.gz | ||
mkdir -p app | ||
rm -f "${BOOST_ARCHIVE}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
if [ "$#" -lt 2 ]; then | ||
echo 'Usage: build-docker-image.sh <dockerFile> <dockerImageTag> [<dockerBuildArgs>...]' >&2 | ||
exit 1 | ||
fi | ||
|
||
dockerFile="$1" | ||
dockerTag="$2" | ||
shift; shift | ||
|
||
scripts="$(dirname "$0")" | ||
|
||
"$scripts"/custom-timeout.sh 20 docker pull "$2" || true | ||
echo "Building $2" | ||
"$scripts"/custom-timeout.sh 30 docker build -f "$1" -t "$2" --cache-from "$2" . | ||
"$scripts"/custom-timeout.sh 20 docker pull "${dockerTag}" || true | ||
echo "Building $dockerTag" | ||
"$scripts"/custom-timeout.sh 30 docker build "$@" -f "${dockerFile}" -t "${dockerTag}" --cache-from "${dockerTag}" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,31 @@ | ||
FROM ubuntu:16.04 | ||
|
||
ENV BOOST_BASENAME=boost_1_66_0 \ | ||
BOOST_ROOT=/tmp/boost_install \ | ||
BOOST_URL=https://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.tar.gz/download | ||
ARG NETWORK=live | ||
|
||
ENV BOOST_ROOT=/tmp/boost_install | ||
|
||
ADD ci /tmp/ci | ||
|
||
RUN apt-get update -qq && apt-get install -yqq \ | ||
build-essential \ | ||
cmake \ | ||
g++ \ | ||
wget && \ | ||
wget -qO ${BOOST_BASENAME}.tar.gz ${BOOST_URL} && \ | ||
tar xzf ${BOOST_BASENAME}.tar.gz && \ | ||
cd ${BOOST_BASENAME} && \ | ||
./bootstrap.sh && \ | ||
./b2 -d0 --prefix=${BOOST_ROOT} link=static install && \ | ||
rm -rf ${BOOST_BASENAME} && \ | ||
rm -f ${BOOST_BASENAME}.tar.gz && \ | ||
cd .. && \ | ||
mkdir /usr/share/raiblocks/ | ||
/tmp/ci/bootstrap_boost.sh -m | ||
|
||
ADD ./ /tmp/src | ||
|
||
RUN mkdir /tmp/build && \ | ||
cd /tmp/build && \ | ||
cmake /tmp/src -DBOOST_ROOT=${BOOST_ROOT} && \ | ||
cmake /tmp/src -DBOOST_ROOT=${BOOST_ROOT} -DACTIVE_NETWORK=rai_${NETWORK}_network && \ | ||
make rai_node && \ | ||
cd .. | ||
cd .. && \ | ||
echo ${NETWORK} > /etc/nano-network | ||
|
||
FROM ubuntu:16.04 | ||
COPY --from=0 /tmp/build/rai_node /usr/bin | ||
COPY --from=0 /etc/nano-network /etc | ||
COPY docker/node/entry.sh /entry.sh | ||
COPY docker/node/config.json /usr/share/raiblocks/config.json | ||
COPY docker/node/config /usr/share/raiblocks/config | ||
RUN chmod +x /entry.sh | ||
CMD ["/bin/bash", "/entry.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,42 @@ | ||
#!/bin/bash | ||
|
||
network='live' | ||
|
||
print_usage() { | ||
echo 'build.sh [-h] [-n {live|beta|test}]' | ||
} | ||
|
||
while getopts 'hn:' OPT; do | ||
case "${OPT}" in | ||
h) | ||
print_usage | ||
exit 0 | ||
;; | ||
n) | ||
network="${OPTARG}" | ||
;; | ||
*) | ||
print_usage >&2 | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
case "${network}" in | ||
live) | ||
network_tag='' | ||
;; | ||
test|beta) | ||
network_tag="-${network}" | ||
;; | ||
*) | ||
echo "Invalid network: ${network}" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
REPO_ROOT=`git rev-parse --show-toplevel` | ||
COMMIT_SHA=`git rev-parse --short HEAD` | ||
pushd $REPO_ROOT | ||
docker build -f docker/node/Dockerfile -t raiblocks-node:latest . | ||
docker build --build-arg NETWORK="${network}" -f docker/node/Dockerfile -t raiblocks-node${network_tag}:latest . | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"version": "2", | ||
"rpc_enable": "true", | ||
"rpc": { | ||
"address": "::ffff:0.0.0.0", | ||
"port": "7076", | ||
"enable_control": "true", | ||
"frontier_request_limit": "16384", | ||
"chain_request_limit": "16384" | ||
}, | ||
"node": { | ||
"version": "8", | ||
"peering_port": "54000", | ||
"bootstrap_fraction_numerator": "1", | ||
"receive_minimum": "1000000000000000000000000", | ||
"logging": { | ||
"version": "2", | ||
"ledger": "false", | ||
"ledger_duplicate": "false", | ||
"vote": "false", | ||
"network": "true", | ||
"network_message": "false", | ||
"network_publish": "false", | ||
"network_packet": "false", | ||
"network_keepalive": "false", | ||
"node_lifetime_tracing": "false", | ||
"insufficient_work": "true", | ||
"log_rpc": "true", | ||
"bulk_pull": "false", | ||
"work_generation_time": "true", | ||
"log_to_cerr": "false", | ||
"max_size": "16777216", | ||
"rotation_size": "4194304", | ||
"flush": "false" | ||
}, | ||
"work_peers": "", | ||
"preconfigured_peers": [ | ||
"rai-beta.raiblocks.net" | ||
], | ||
"preconfigured_representatives": [ | ||
"xrb_3kbzg73bjsi85scbwnouj44iinrsqtdqphzay1x3pwmgmhkdwg8yjntxff33" | ||
], | ||
"inactive_supply": "0", | ||
"password_fanout": "1024", | ||
"io_threads": "4", | ||
"work_threads": "4", | ||
"enable_voting": "true", | ||
"bootstrap_connections": "16", | ||
"callback_address": "", | ||
"callback_port": "0", | ||
"callback_target": "", | ||
"lmdb_max_dbs": "128" | ||
}, | ||
"opencl_enable": "false", | ||
"opencl": { | ||
"platform": "0", | ||
"device": "0", | ||
"threads": "1048576" | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.