-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1487 from steemit/master
Steem 0.19.2
- Loading branch information
Showing
24 changed files
with
655 additions
and
259 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
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 |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# this will need to increase depending on which plugins/apis you use | ||
# 16 GB should be sufficient for a consensus node | ||
shared-file-size = 16G | ||
|
||
# Endpoint for P2P node to listen on | ||
# p2p-endpoint = | ||
|
||
# Maxmimum number of incoming connections on P2P endpoint | ||
# p2p-max-connections = | ||
|
||
# P2P nodes to connect to on startup (may specify multiple times) | ||
# seed-node = | ||
|
||
# Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. | ||
# checkpoint = | ||
|
||
# Endpoint for websocket RPC to listen on | ||
# rpc-endpoint = | ||
|
||
# Endpoint for TLS websocket RPC to listen on | ||
# rpc-tls-endpoint = | ||
|
||
# The TLS certificate file for this server | ||
# server-pem = | ||
|
||
# Password for this certificate | ||
# server-pem-password = | ||
|
||
# Block signing key to use for init witnesses, overrides genesis file | ||
# dbg-init-key = | ||
|
||
# API user specification, may be specified multiple times | ||
# api-user = | ||
|
||
# Set an API to be publicly available, may be specified multiple times | ||
public-api = database_api login_api | ||
|
||
# Plugin(s) to enable, may be specified multiple times | ||
enable-plugin = account_history | ||
|
||
# JSON list of [nblocks,nseconds] pairs, see doc/bcd-trigger.md | ||
bcd-trigger = [[0,10],[85,300]] | ||
|
||
# Defines a range of accounts to track as a json pair ["from","to"] [from,to] | ||
track-account-range = ["exchange_account", "exchange_account"] | ||
|
||
# Ignore posting operations, only track transfers and account updates | ||
# filter-posting-ops = | ||
|
||
# Database edits to apply on startup (may specify multiple times) | ||
# edit-script = | ||
|
||
# RPC endpoint of a trusted validating node (required) | ||
# trusted-node = | ||
|
||
# Set the maximum size of cached feed for an account | ||
# follow-max-feed-size = 500 | ||
|
||
# Track market history by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers | ||
# 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) | ||
# history-per-size = 5760 | ||
|
||
# Defines a range of accounts to private messages to/from as a json pair ["from","to"] [from,to) | ||
# pm-account-range = | ||
|
||
# Enable block production, even if the chain is stale. | ||
# enable-stale-production = false | ||
|
||
# Percent of witnesses (0-99) that must be participating in order to produce blocks | ||
# required-participation = false | ||
|
||
# name of witness controlled by this node (e.g. initwitness ) | ||
# witness = | ||
|
||
# name of miner and its private key (e.g. ["account","WIF PRIVATE KEY"] ) | ||
# miner = | ||
|
||
# Number of threads to use for proof of work mining | ||
# mining-threads = | ||
|
||
# WIF PRIVATE KEY to be used by one or more witnesses or miners | ||
# private-key = | ||
|
||
# Account creation fee to be voted on upon successful POW - Minimum fee is 100.000 STEEM (written as 100000) | ||
# miner-account-creation-fee = | ||
|
||
# Maximum block size (in bytes) to be voted on upon successful POW - Max block size must be between 128 KB and 750 MB | ||
# miner-maximum-block-size = | ||
|
||
# SBD interest rate to be vote on upon successful POW - Default interest rate is 10% (written as 1000) | ||
# miner-sbd-interest-rate = | ||
|
||
# declare an appender named "stderr" that writes messages to the console | ||
[log.console_appender.stderr] | ||
stream=std_error | ||
|
||
# declare an appender named "p2p" that writes messages to p2p.log | ||
[log.file_appender.p2p] | ||
filename=logs/p2p/p2p.log | ||
# filename can be absolute or relative to this config file | ||
|
||
# route any messages logged to the default logger to the "stderr" logger we | ||
# declared above, if they are info level are higher | ||
[logger.default] | ||
level=info | ||
appenders=stderr | ||
|
||
# route messages sent to the "p2p" logger to stderr too | ||
[logger.p2p] | ||
level=info | ||
appenders=stderr | ||
|
||
|
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,95 @@ | ||
Exchange Quickstart | ||
------------------- | ||
|
||
System Requirements: A minimum of 16GB of RAM and at least 50GB 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. | ||
|
||
We recommend using docker to both build and run STEEM for exchanges. Docker is the world's leading containerization platform and using it guarantees that your build and run environment is identical to what our developers use. You can still build from source and you can keep both blockchain data and wallet data outside of the docker container. The instructions below will show you how to do this in just a few easy steps. | ||
|
||
### Install docker and git (if not already installed) | ||
|
||
On Ubuntu 16.04+: | ||
``` | ||
apt-get update && apt-get install git docker.io -y | ||
``` | ||
|
||
On other distributions you can install docker with the native package manager or with the script from get.docker.com: | ||
``` | ||
curl -fsSL get.docker.com -o get-docker.sh | ||
sh get-docker.sh | ||
``` | ||
|
||
### Clone the steem repo | ||
|
||
Pull in the steem repo from the official source on github and then change into the directory that's created for it. | ||
``` | ||
git clone https://github.com/steemit/steem | ||
cd steem | ||
``` | ||
|
||
### Build the image from source with docker | ||
|
||
Docker isn't just for downloading already built images, it can be used to build from source the same way you would otherwise build. By doing this you ensure that your build environment is identical to what we use to develop the software. Use the below command to start the build: | ||
|
||
``` | ||
docker build -t=steemit/steem . | ||
``` | ||
|
||
Don't forget the `.` at the end of the line which indicates the build target is in the current directory. | ||
|
||
This will build everything including running our full suite of tests during the build process. It will anywhere from thirty minutes to a couple hours depending on how fast your equipment is. | ||
|
||
When the build completes you will see a message indicating that it is 'successfully built'. | ||
|
||
### Using our official Docker images without building from source | ||
|
||
If you'd like to use our already pre-built official binary images, it's as simple as downloading it from the Dockerhub registry with only one command: | ||
|
||
``` | ||
docker pull steemit/steem | ||
``` | ||
|
||
### Running a binary build without a Docker container | ||
|
||
If you build with Docker but do not want to run steemd from within a docker container, you can stop here with this step and instead extract the binary from the container with the commands below. If you are going to run steemd with docker (recommended method), skip this step altogether. We're simply providing an option for everyone's use-case. Our binaries are built mostly static, only dynamically linking to linux kernel libraries. We have tested and confirmed binaries built in Docker work on Ubuntu and Fedora and will likely work on many other Linux distrubutions. Building the image yourself or pulling one of our pre-built images both work. | ||
|
||
To extract the binary you need to start a container and then copy the file from it. | ||
|
||
``` | ||
docker run -d --name steemd-exchange steemit/steem | ||
docker cp steemd-exchange:/usr/local/steemd-default/bin/steemd /local/path/to/steemd | ||
docker cp steemd-exchange:/usr/local/steemd-default/bin/cli_wallet /local/path/to/cli_wallet | ||
docker stop steemd-exchange | ||
``` | ||
|
||
For your convenience, we have provided a provided an [example\_config](doc/example\_config.ini) that we expect should be sufficient to run your exchange node. Be sure to rename it to simply `config.ini`. | ||
|
||
### Create directories to store blockchain and wallet data outside of Docker | ||
|
||
For re-usability, you can create directories to store blockchain and wallet data and easily link them inside your docker container. | ||
|
||
``` | ||
mkdir blockchain | ||
mkdir steemwallet | ||
``` | ||
|
||
### Run the container | ||
|
||
The below command will start a daemonized instance opening ports for p2p and RPC while linking the directories we created for blockchain and wallet data inside the container. Fill in `TRACK_ACCOUNT` with the name of your exchange account that you want to follow. The `-v` flags are how you map directories outside of the container to the inside, you list the path to the directories you created earlier before the `:` for each `-v` flag. The restart policy ensures that the container will automatically restart even if your system is restarted. | ||
|
||
``` | ||
docker run -d --name steemd-exchange --env TRACK_ACCOUNT=nameofaccount -p 2001:2001 -p 8090:8090 -v /path/to/steemwallet:/var/steemwallet -v /path/to/blockchain:/var/lib/steemd/blockchain --restart always steemit/steem | ||
``` | ||
|
||
You can see that the container is running with the `docker ps` command. | ||
|
||
To follow along with the logs, use `docker logs -f`. | ||
|
||
Initial syncing will take between 6 and 48 hours depending on your equipment, faster storage devices will take less time and be more efficient. Subsequent restarts will not take as long. | ||
|
||
### Running the cli_wallet | ||
|
||
The command below will run the cli_wallet from inside the running container while mapping the `wallet.json` to the directory you created for it on the host. | ||
|
||
``` | ||
docker exec -it steemd-exchange /usr/local/steemd-default/bin/cli_wallet -w /var/steemwallet/wallet.json | ||
``` |
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
Oops, something went wrong.