diff --git a/Dockerfile b/Dockerfile index 2fbeddd5cc..cce4cf560a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,6 @@ RUN \ jq \ wget \ virtualenv \ - gdb \ libgflags-dev \ libsnappy-dev \ zlib1g-dev \ @@ -64,7 +63,6 @@ RUN \ RUN \ if [ "$BUILD_STEP" = "1" ] || [ ! "$BUILD_STEP" ] ; then \ cd /usr/local/src/steem && \ - git submodule update --init --recursive && \ mkdir build && \ cd build && \ cmake \ @@ -96,7 +94,6 @@ RUN \ RUN \ if [ "$BUILD_STEP" = "2" ] || [ ! "$BUILD_STEP" ] ; then \ cd /usr/local/src/steem && \ - git submodule update --init --recursive && \ mkdir build && \ cd build && \ cmake \ @@ -135,7 +132,6 @@ RUN \ RUN \ if [ "$BUILD_STEP" = "1" ] || [ ! "$BUILD_STEP" ] ; then \ cd /usr/local/src/steem && \ - git submodule update --init --recursive && \ mkdir build && \ cd build && \ cmake \ @@ -165,7 +161,6 @@ RUN \ RUN \ if [ "$BUILD_STEP" = "2" ] || [ ! "$BUILD_STEP" ] ; then \ cd /usr/local/src/steem && \ - git submodule update --init --recursive && \ mkdir build && \ cd build && \ cmake \ diff --git a/README.md b/README.md index bd93fd4fc2..7d6df5e24a 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Originally, Steem was announced on the [Bitcointalk forum](https://bitcointalk.o # Installation -Getting started with Steem is fairly simple. You can either choose to use docker-images, build with docker manually or build from source directly. All steps have been documented and while many different OS are supported, the easiest one is Ubuntu 16.04. +Getting started with Steem is fairly simple. You can either choose to use docker-images, build with docker manually or build from source directly. All steps have been documented and while many different OS are supported, the easiest one is Ubuntu 18.04. ## Quickstart @@ -90,11 +90,11 @@ on how to use lcov to check code test coverage. ## Config File -Run `steemd` once to generate a data directory and config file. The default location is `witness_node_data_dir`. Kill `steemd`. It won't do anything without seed nodes. If you want to modify the config to your liking, we have two example configs used in the docker images. ( [consensus node](contrib/config-for-docker.ini), [full node](contrib/fullnode.config.ini) ) All options will be present in the default config file and there may be more options needing to be changed from the docker configs (some of the options actually used in images are configured via command line). +Run `steemd` once to generate a data directory and config file. The default location is `~/.steemd`. Kill `steemd`. It won't do anything without seed nodes. If you want to modify the config to your liking, we have two example configs used in the docker images. ( [consensus node](contrib/config-for-docker.ini), [full node](contrib/fullnode.config.ini) ) All options will be present in the default config file and there may be more options needing to be changed from the docker configs (some of the options actually used in images are configured via command line). ## Seed Nodes -A list of some seed nodes to get you started can be found in +A list of most reliable seed nodes is compiled in steemd, and can also be found in [doc/seednodes.txt](doc/seednodes.txt). This same file is baked into the docker images and can be overridden by @@ -123,7 +123,8 @@ Steemd now supports a PaaS mode (platform as a service) that currently works wit ## System Requirements -For a full web node, you need at least 110GB of disk space available. Steemd uses a memory mapped file which currently holds 56GB of data and by default is set to use up to 80GB. The block log of the blockchain itself is a little over 27GB. It's highly recommended to run steemd on a fast disk such as an SSD or by placing the shared memory files in a ramdisk and using the `--shared-file-dir=/path` command line option to specify where. At least 16GB of memory is required for a full web node. Seed nodes (p2p mode) can run with as little as 4GB of memory with a 24 GB state file. Any CPU with decent single core performance should be sufficient. Steemd is constantly growing. As of August 2017, these numbers were accurate, but you may find you need more disk space to run a full node. We are also constantly working on optimizing Steem's use of disk space. +A dedicated server or virtual machine with a minimum of 64GB of RAM, and at least 350GB of fast local SSD storage. STEEM is one of the most active blockchains in the world and handles an incredibly large amount of transactions per second, as such, it requires fast storage to run efficiently. +Any modern 64-bit CPU with decent single core performance should be sufficient. Steemd is constantly growing. As of August 2019, these numbers were accurate, but you may find you need more disk space to run a full node. We are also constantly working on optimizing Steem's use of disk space. On Linux use the following Virtual Memory configuration for the initial sync and subsequent replays. It is not needed for normal operation. diff --git a/contrib/config-for-ahnode.ini b/contrib/config-for-ahnode.ini index c66ad34d7b..c709b88f72 100644 --- a/contrib/config-for-ahnode.ini +++ b/contrib/config-for-ahnode.ini @@ -37,27 +37,12 @@ shared-file-size = 70G # Database edits to apply on startup (may specify multiple times) # edit-script = -# Set the maximum size of cached feed for an account -follow-max-feed-size = 500 - -# Block time (in epoch seconds) when to start calculating feeds -# follow-start-feeds = 0 - -# Track market history by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers -market-history-bucket-size = [15,60,300,3600,86400] - -# How far back in time to track history for each bucket size, measured in the number of buckets (default: 5760) -market-history-buckets-per-size = 5760 - # The local IP address and port to listen for incoming connections. # p2p-endpoint = # Maxmimum number of incoming connections on P2P endpoint # p2p-max-connections = -# The IP address and port of a remote peer to sync with. Deprecated in favor of p2p-seed-node. -# seed-node = - # The IP address and port of a remote peer to sync with. # p2p-seed-node = diff --git a/contrib/config-for-broadcaster.ini b/contrib/config-for-broadcaster.ini index 98774b8752..d5b5980a74 100644 --- a/contrib/config-for-broadcaster.ini +++ b/contrib/config-for-broadcaster.ini @@ -37,27 +37,12 @@ flush-state-interval = 0 # Database edits to apply on startup (may specify multiple times) # edit-script = -# Set the maximum size of cached feed for an account -follow-max-feed-size = 500 - -# Block time (in epoch seconds) when to start calculating feeds -# follow-start-feeds = 0 - -# Track market history by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers -market-history-bucket-size = [15,60,300,3600,86400] - -# How far back in time to track history for each bucket size, measured in the number of buckets (default: 5760) -market-history-buckets-per-size = 5760 - # The local IP address and port to listen for incoming connections. # p2p-endpoint = # Maxmimum number of incoming connections on P2P endpoint # p2p-max-connections = -# The IP address and port of a remote peer to sync with. Deprecated in favor of p2p-seed-node. -# seed-node = - # The IP address and port of a remote peer to sync with. # p2p-seed-node = diff --git a/contrib/config-for-docker.ini b/contrib/config-for-docker.ini index 299f8e7f3c..3e5936eafb 100644 --- a/contrib/config-for-docker.ini +++ b/contrib/config-for-docker.ini @@ -47,27 +47,12 @@ flush-state-interval = 0 # Database edits to apply on startup (may specify multiple times) # edit-script = -# Set the maximum size of cached feed for an account -follow-max-feed-size = 500 - -# Block time (in epoch seconds) when to start calculating feeds -# follow-start-feeds = 0 - -# Track market history by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers -market-history-bucket-size = [15,60,300,3600,86400] - -# How far back in time to track history for each bucket size, measured in the number of buckets (default: 5760) -market-history-buckets-per-size = 5760 - # The local IP address and port to listen for incoming connections. # p2p-endpoint = # Maxmimum number of incoming connections on P2P endpoint # p2p-max-connections = -# The IP address and port of a remote peer to sync with. Deprecated in favor of p2p-seed-node. -# seed-node = - # The IP address and port of a remote peer to sync with. # p2p-seed-node = @@ -93,4 +78,4 @@ enable-stale-production = false # witness = # WIF PRIVATE KEY to be used by one or more witnesses or miners -# private-key = \ No newline at end of file +# private-key = diff --git a/contrib/fullnode.config.ini b/contrib/fullnode.config.ini index 7c7206e4fc..63fdce5256 100644 --- a/contrib/fullnode.config.ini +++ b/contrib/fullnode.config.ini @@ -37,12 +37,6 @@ shared-file-size = 300G # Database edits to apply on startup (may specify multiple times) # edit-script = -# Set the maximum size of cached feed for an account -follow-max-feed-size = 500 - -# Block time (in epoch seconds) when to start calculating feeds -# follow-start-feeds = 0 - # Track market history by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers market-history-bucket-size = [15,60,300,3600,86400] @@ -55,9 +49,6 @@ market-history-buckets-per-size = 5760 # Maxmimum number of incoming connections on P2P endpoint # p2p-max-connections = -# The IP address and port of a remote peer to sync with. Deprecated in favor of p2p-seed-node. -# seed-node = - # The IP address and port of a remote peer to sync with. # p2p-seed-node = diff --git a/doc/building.md b/doc/building.md index 5005dc4cb6..0a6c9fea05 100644 --- a/doc/building.md +++ b/doc/building.md @@ -30,6 +30,11 @@ By default this is off. Enabling will prevent the account history plugin queryin by id, but saving around 65% of CPU time when reindexing. Enabling this option is a huge gain if you do not need this functionality. +### ENABLE_MIRA=[OFF/ON] + +By default this is off, builds steemd with BMIC MMAP. Enabling will build with MIRA. +For MIRA ensure that user running steemd will have open files limit set high enough (`ulimit -n`) + ## Building under Docker We ship a Dockerfile. This builds both common node type binaries. @@ -38,9 +43,9 @@ We ship a Dockerfile. This builds both common node type binaries. cd steem docker build -t steemit/steem . -## Building on Ubuntu 16.04 +## Building on Ubuntu 18.04 / 16.04 -For Ubuntu 16.04 users, after installing the right packages with `apt` Steem +After installing the right packages with `apt` Steem will build out of the box without further effort: sudo apt-get update @@ -87,7 +92,6 @@ will build out of the box without further effort: git clone https://github.com/steemit/steem cd steem git checkout stable - git submodule update --init --recursive mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. @@ -96,70 +100,6 @@ will build out of the box without further effort: # optional make install # defaults to /usr/local -## Building on Ubuntu 14.04 - -(It is strongly advised to use Ubuntu 16.04 LTS instead) - -Here are the required packages: - - # Required packages - sudo apt-get install -y \ - autoconf \ - cmake3 \ - g++ \ - git \ - libbz2-dev \ - libsnappy-dev \ - libssl-dev \ - libtool \ - make \ - pkg-config \ - doxygen \ - libncurses5-dev \ - libreadline-dev \ - libbz2-dev \ - python-dev \ - perl \ - python3 \ - python3-jinja2 \ - doxygen - -The Boost provided in the Ubuntu 14.04 package manager (Boost 1.55) is too old. -Steem requires Boost 1.58 (as in Ubuntu 16.04) and works with versions up to 1.60 (including). -So building Steem on Ubuntu 14.04 requires downloading and installing a more recent -version of Boost. - -According to [this mailing list -post](http://boost.2283326.n4.nabble.com/1-58-1-bugfix-release-necessary-td4674686.html), -Boost 1.58 is not compatible with gcc 4.8 (the default C++ compiler for -Ubuntu 14.04) when compiling in C++11 mode (which Steem does). -So we will use Boost 1.60. - -Here is how to build and install Boost 1.60 into your user's home directory -(make sure you install all the packages above first): - - export BOOST_ROOT=$HOME/opt/boost_1_60_0 - URL='http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.bz2/download' - wget -c "$URL" -O boost_1_60_0.tar.bz2 - [ $( sha256sum boost_1_60_0.tar.bz2 | cut -d ' ' -f 1 ) == \ - "686affff989ac2488f79a97b9479efb9f2abae035b5ed4d8226de6857933fd3b" ] \ - || ( echo 'Corrupt download' ; exit 1 ) - tar xjf boost_1_60_0.tar.bz2 - cd boost_1_60_0 - ./bootstrap.sh "--prefix=$BOOST_ROOT" - ./b2 install - -Then the instructions are the same as for steem: - - git clone https://github.com/steemit/steem - cd steem - git checkout stable - git submodule update --init --recursive - mkdir build && cd build - cmake -DCMAKE_BUILD_TYPE=Release .. - make -j$(nproc) steemd - make -j$(nproc) cli_wallet - ## Building on macOS X Install Xcode and its command line tools by following the instructions here: diff --git a/doc/example_config.ini b/doc/example_config.ini index 9aa02d7254..f0dd3776e5 100644 --- a/doc/example_config.ini +++ b/doc/example_config.ini @@ -41,27 +41,12 @@ flush-state-interval = 0 # Database edits to apply on startup (may specify multiple times) # edit-script = -# Set the maximum size of cached feed for an account -follow-max-feed-size = 500 - -# Block time (in epoch seconds) when to start calculating feeds -# follow-start-feeds = 0 - -# Track market history by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers -market-history-bucket-size = [15,60,300,3600,86400] - -# How far back in time to track history for each bucket size, measured in the number of buckets (default: 5760) -market-history-buckets-per-size = 5760 - # The local IP address and port to listen for incoming connections. # p2p-endpoint = # Maxmimum number of incoming connections on P2P endpoint # p2p-max-connections = -# The IP address and port of a remote peer to sync with. Deprecated in favor of p2p-seed-node. -# seed-node = - # The IP address and port of a remote peer to sync with. # p2p-seed-node = @@ -87,4 +72,4 @@ enable-stale-production = false # witness = # WIF PRIVATE KEY to be used by one or more witnesses or miners -# private-key = \ No newline at end of file +# private-key = diff --git a/doc/exchangequickstart.md b/doc/exchangequickstart.md index 8a66b92c8d..4bd5ed7a83 100644 --- a/doc/exchangequickstart.md +++ b/doc/exchangequickstart.md @@ -5,7 +5,7 @@ System Requirements: A dedicated server or virtual machine with a minimum of 64G With the right equipment and technical configuration a reindex should take **no longer than 72 hours**. If recommendations are not followed precisely, the reindex can drag on for days or even weeks with significant slowdowns towards the end. -Physically attached SSD will ensure an optimal reindex time. SSD over a NAS or some kind of network storage backed by SSD will often have much higher latency. As an example, AWS EBS is not performant enough. A good recommended instance in AWS is the i3.2xlarge, it comes with a physically attached nVME drive (it must be formatted and mounted on instance launch). +Physically attached SSD will ensure an optimal reindex time. SSD over a NAS or some kind of network storage backed by SSD will often have much higher latency. As an example, AWS EBS is not performant enough. A good recommended instance in AWS is the i3.2xlarge, it comes with a physically attached NVMe drive (it must be formatted and mounted on instance launch). You can save a lot of time by replaying from a `block_log`. Steemit hosts a public `block_log` that is regularly updated. Using the docker method below, we have made it easy to download a `block_log` at launch and replay from it by passing in the `USE_PUBLIC_BLOCKLOG=1` environment variable. To do this, make sure your data directory is empty and does not contain a block_log. If you are not using docker, you can download a `block_log` from [here](https://s3.amazonaws.com/steemit-dev-blockchainstate/block_log-latest), put it in your steem data directory, and use the `--replay-blockchain` command line option. Be sure to remove the option if you have to stop/restart steemd after already being synced. @@ -133,4 +133,4 @@ docker stop steemd-exchange docker rm steemd-exchange docker pull steemit/steem docker run -d --name steemd-exchange --env TRACK_ACCOUNT=nameofaccount --env USE_PUBLIC_BLOCKLOG=1 -p 2001:2001 -p 8090:8090 -v /path/to/steemwallet:/var/steemwallet -v /path/to/blockchain:/var/lib/steemd/blockchain --restart always steemit/steem -``` \ No newline at end of file +``` diff --git a/doc/quickstart.md b/doc/quickstart.md deleted file mode 100644 index 4cb8b92b97..0000000000 --- a/doc/quickstart.md +++ /dev/null @@ -1,71 +0,0 @@ -Quickstart ----------- - -### Get current steemd -Use docker: -``` -docker run \ - -d -p 2001:2001 -p 8090:8090 --name steemd-default \ - --restart unless-stopped steemit/steem -``` -#### Low memory node? -Above runs low memory node, which is suitable for: -- seed nodes -- witness nodes -- exchanges, etc. -For full api node use: - -``` -docker run \ - --env USE_WAY_TOO_MUCH_RAM=1 --env USE_FULL_WEB_NODE=1 \ - -d -p 2001:2001 -p 8090:8090 --name steemd-full \ - --restart unless-stopped \ - steemit/steem -``` -### Configure for your use case -#### Full API node -You need to use `USE_WAY_TOO_MUCH_RAM=1` and `USE_FULL_WEB_NODE=1` as stated above. -You can Use `contrib/fullnode.config.ini` as a base for your `config.ini` file. - -#### Exchanges -Use low memory node. - -Also make sure that your `config.ini` contains: -``` -enable-plugin = account_history -public-api = database_api login_api -track-account-range = ["yourexchangeid", "yourexchangeid"] -``` -Do not add other APIs or plugins unless you know what you are doing. - -This configuration exists in Docker with the following command - -``` -docker run -d --env TRACK_ACCOUNT="yourexchangeid" \ - --name steemd \ - --restart unless-stopped \ - steemit/steem -``` - -### Resources usage - -Please make sure that you have enough resources available. -Check `shared-file-size =` in your `config.ini` to reflect your needs. -Set it to at least 25% more than current size. - -Provided values are expected to grow significantly over time. - -Blockchain data takes over **16GB** of storage space. - -#### Full node -Shared memory file for full node uses over **65GB** - -#### Exchange node -Shared memory file for exchange node users over **16GB** -(tracked history for single account) - -#### Seed node -Shared memory file for seed node uses over **5.5GB** - -#### Other use cases -Shared memory file size varies, depends on your specific configuration but it is expected to be somewhere between "seed node" and "full node" usage.