Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steem 0.14.3 #529

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
58aef14
test IS_TEST_NET
theoreticalbts Aug 23, 2016
3c98df6
Fix expected active witnesses check for testnet
theoreticalbts Aug 31, 2016
ea07bbe
Allow debug node to generate blocks without editing database
theoreticalbts Sep 8, 2016
00f7cbd
add extra data to discussion to capture reblog state
revflash Sep 13, 2016
edadec5
Update get_state to use follow plugin blog
Sep 16, 2016
13e59aa
now caches build image
sneak Sep 16, 2016
e015e1b
removed doxygen from CI tests for speed
sneak Sep 16, 2016
f48ef16
looks like it needs doxygen's output
sneak Sep 16, 2016
1f4f6b4
Adds pagination for an account's comments.
Sep 16, 2016
354cd6b
Merge pull request #428 from steemit/20160913-follow
Sep 16, 2016
6ccf432
Merge pull request #427 from steemit/426-fasttests
Sep 19, 2016
76d386f
Fix deleting blog_object when comment is deleted #440
Sep 19, 2016
7feb97a
Merge pull request #443 from steemit/440-follow-blog-bug
Sep 19, 2016
34b6ff2
Posts in "@user/posts" are now stored as author/permlink.
Sep 20, 2016
ae15231
Assert upper limit for get_replies_by_last_update API call #445
Sep 21, 2016
ece936f
Add savings and escrow ops to unfiltered account history #381
Sep 21, 2016
1927ce7
Add liquid steem to author reward virtual op
Sep 21, 2016
9ff0fde
Merge pull request #456 from steemit/381-vop-fixes
Sep 22, 2016
f271bfb
Merge pull request #449 from steemit/445-api-fixes
Sep 22, 2016
72270cd
Validate posting auth and check for account auth existence as a soft …
Sep 26, 2016
7039336
Bump version for soft fork and check merkle root on checkpointing #465
Sep 27, 2016
6166384
Fix pow2_op test to account for fractional difficulty.
Sep 27, 2016
edd1244
get_discussion: Set maximum number of iterations on loop, log when m…
theoreticalbts Sep 30, 2016
8d33584
Merge pull request #475 from steemit/20160930-dan-dos-hotfix
theoreticalbts Sep 30, 2016
dd7975d
authority.hpp: Don't reflect typename for classification enum #264
theoreticalbts Sep 23, 2016
3920af7
Bump fc #476
theoreticalbts Sep 30, 2016
70119bc
now builds both default node and web-supporting node!
sneak Oct 1, 2016
cbbd703
fix error on startup if blockchain cache file does not exist
sneak Oct 1, 2016
05c870b
Merge pull request #466 from steemit/465-auth-validate
Oct 3, 2016
598a603
Merge pull request #481 from steemit/476-bump-fc
Oct 3, 2016
bc37c75
Merge pull request #480 from steemit/470-dualbuild
Oct 4, 2016
401a18f
Update mining stats display #282
theoreticalbts Oct 3, 2016
9170d5c
refactored documentation, moved seed nodes into doc/ #487
Oct 4, 2016
5539254
fixed busted markdown indentation #487
Oct 4, 2016
c279540
added docker build instructions #487
sneak Oct 4, 2016
509e9e8
copyediting #487
sneak Oct 4, 2016
8348762
update dockerhub organization name #487
sneak Oct 5, 2016
6b9573a
Minor cleanup of seednodes.txt #487
theoreticalbts Oct 6, 2016
389175e
fixes #488 and removes tests from main Dockerfile
sneak Oct 7, 2016
f786147
Merge pull request #487 from steemit/sneak/documentationupdate
Oct 13, 2016
7398db2
Merge pull request #488 from steemit/sneak/remove-tests-from-prod-build
Oct 13, 2016
f5df7cd
Merge pull request #484 from steemit/282-update-mining-stats
Oct 13, 2016
c1c0224
Improved and updated Steem seed nodes list
Gandalf-the-Grey Oct 13, 2016
f80137a
Merge pull request #505 from Gandalf-the-Grey/updated-steem-seed-node…
theoreticalbts Oct 14, 2016
39e70c6
newplugin.py: Updates to new plugin template #506
theoreticalbts Oct 14, 2016
2b28dbd
Update compile-time constants #510
theoreticalbts Oct 14, 2016
a713cab
Remove deterministic_openssl_rand #511
theoreticalbts Oct 14, 2016
b7dfeea
Convert last_hardfork variable to uint32_t #485
theoreticalbts Oct 14, 2016
4595608
Merge branch 'debug_mine' into develop
theoreticalbts Oct 17, 2016
1fb6bb9
Use proper skip flags in debug_generate_blocks() #519
theoreticalbts Oct 19, 2016
c103b0a
Don't change logic for number of slots to miss in debug_generate_bloc…
theoreticalbts Oct 19, 2016
f9a6e27
Partially revert debug_generate_blocks_until() implementation #519
theoreticalbts Oct 19, 2016
48d5bf7
Merge pull request #508 from steemit/506-update-newplugin
Oct 21, 2016
43ebdb5
Merge pull request #512 from steemit/510-update-constants
Oct 21, 2016
d4b2bdc
Merge pull request #513 from steemit/511-remove-deterministic-rand
Oct 21, 2016
d5ce8dd
Merge pull request #515 from steemit/485-uint32-last-hardfork
Oct 21, 2016
c86cfea
Merge pull request #520 from steemit/519-debug-mine
Oct 21, 2016
7e43fb9
Fix mining threads #525
Oct 21, 2016
0125a45
Merge pull request #528 from steemit/525-mining-threads
Oct 21, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ LIST(APPEND BOOST_COMPONENTS thread
locale)
SET( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )

OPTION( ENABLE_CONTENT_PATCHING "Allow posts to be updated with a patch rather than replaced, Requires Qt5" ON )

OPTION( BUILD_STEEM_TESTNET "Build source for test network (ON OR OFF)" OFF )
MESSAGE( STATUS "BUILD_STEEM_TESTNET: ${BUILD_STEEM_TESTNET}" )
if( BUILD_STEEM_TESTNET )
Expand Down
43 changes: 21 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,29 @@ ADD . /usr/local/src/steem
RUN \
cd /usr/local/src/steem && \
git submodule update --init --recursive && \
rsync -a \
/usr/local/src/steem/ \
/usr/local/src/steemtest/

RUN \
cd /usr/local/src/steemtest && \
mkdir build && \
cd build && \
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_STEEM_TESTNET=On \
-DCMAKE_INSTALL_PREFIX=/usr/local/steemd-default \
-DCMAKE_BUILD_TYPE=Release \
-DLOW_MEMORY_NODE=ON \
. \
-DCLEAR_VOTES=ON \
-DBUILD_STEEM_TESTNET=OFF \
.. \
&& \
make -j$(nproc) chain_test && \
./tests/chain_test && \
rm -rf /usr/local/src/steemtest

RUN \
cd /usr/local/src/steem && \
doxygen && \
programs/build_helpers/check_reflect.py

RUN \
cd /usr/local/src/steem && \
make -j$(nproc) && \
make install && \
cd .. && \
rm -rfv build && \
mkdir build && \
cd build && \
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/steemd-full \
-DCMAKE_BUILD_TYPE=Release \
-DLOW_MEMORY_NODE=ON \
. \
-DLOW_MEMORY_NODE=OFF \
-DCLEAR_VOTES=OFF \
-DBUILD_STEEM_TESTNET=OFF \
.. \
&& \
make -j$(nproc) && \
make install && \
Expand Down Expand Up @@ -132,5 +128,8 @@ RUN mkdir -p /etc/service/steemd
ADD contrib/steemd.run /etc/service/steemd/run
RUN chmod +x /etc/service/steemd/run

# add seednodes from documentation to image
ADD doc/seednodes.txt /etc/steemd/seednodes.txt

# the following adds lots of logging info to stdout
ADD contrib/config-for-docker.ini /etc/steemd/config.ini
20 changes: 20 additions & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM steemitinc/ci-test-environment:latest

ADD . /usr/local/src/steem

RUN \
cd /usr/local/src/steem && \
git submodule update --init --recursive && \
mkdir build && \
cd build && \
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_STEEM_TESTNET=ON \
-DLOW_MEMORY_NODE=OFF \
-DCLEAR_VOTES=ON \
.. && \
make -j$(nproc) chain_test && \
./tests/chain_test && \
cd /usr/local/src/steem && \
doxygen && \
programs/build_helpers/check_reflect.py
147 changes: 48 additions & 99 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,137 +1,86 @@
Introducing Steem (beta)
-----------------
# Introducing Steem (beta)

Steem is an experimental Proof of Work blockchain with an unproven consensus
algorithm.

- Currency Symbol STEEM
- Currency symbol STEEM
- 1.000 STEEM block reward at launch
- Approximately 100% APR long term inflation rate

Public Announcement & Discussion
--------------------------------
# Public Announcement & Discussion

Steem was announced on [Bitcointalk](https://bitcointalk.org/index.php?topic=1410943.new) prior to the start of any mining.
Steem was announced on the
[Bitcointalk forum](https://bitcointalk.org/index.php?topic=1410943.new) prior to
the start of any mining.

# No Support & No Warranty

No Support & No Warranty
------------------------
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

Code is Documentation
---------------------
# Code is Documentation

Rather than attempt to describe the rules of the blockchain, it is up to
each individual to inspect the code to understand the consensus rules.

Seed Nodes
----------

xeldal 45.55.217.111:12150 (USA)
ihashfury 104.168.154.160:40696
lafona 52.4.250.181:39705
steempty 109.74.206.93:2001 steem.clawmap.com (UK)
steem-id 45.114.118.146:2001 (Indonesia)
cyrano.witness 81.89.101.133:2001 (Jena, Germany)
kushed 40.76.37.6:2001 steem.kushed.com (Azure)
nextgencrypto 104.207.152.44:2201 steemwitness.com (Los Angeles, USA)
pharesim 78.46.32.4 steemd.pharesim.me (Falkenstein, German)
liondani 212.117.213.186:2016 (Switzerland)
someguy123 199.241.186.130:2001 steemit-seed.someguy123.com:2001
smooth.witness 52.74.152.79:2001

52.38.66.234:2001
52.37.169.52:2001
52.26.78.244:2001
192.99.4.226:2001
46.252.27.1:1337
81.89.101.133:2001
52.4.250.181:39705
steemd.pharesim.me:2001
seed.steemed.net:2001
steem.clawmap.com:2001
seed.steemwitness.com:2001
steem-seed1.abit-more.com:2001


How to Mine
-----------

The mining algorithm used by Steem requires the owner to have access to the private key
used by the account. This means it does not favor mining pools.

./steemd --miner=["accountname","${WIFPRIVATEKEY}"] --witness="accountname" --seed-node="52.38.66.234:2001"

Make sure that your accountname is unique and not already used by someone else or your proof of work
might not be accepted by the blockchain.
# Quickstart

OS-specific build instructions
------------------------------
Just want to get up and running quickly? Try deploying a prebuilt
dockerized container. Both common binary types are included.

See [here](doc/build-ubuntu.md) for Linux and [here](doc/build-osx.md) for OSX (Apple).
## Dockerized p2p Node

cmake Build Options
--------------------------
To run a p2p node (ca. 2GB of memory is required at the moment):

### CMAKE_BUILD_TYPE=[Release/Debug]
docker run \
-d -p 2001:2001 -p 8090:8090 --name steemd-default \
steemit/steem

Specifies whether to build with or without optimization and without or with the symbol table for debugging. Unless you are specifically
debugging or running tests, it is recommended to build as release.
docker logs -f steemd-default # follow along

### LOW_MEMORY_NODE=[OFF/ON]
## Dockerized Full Node

Builds steemd to be a consensus only low memory node. Data and fields not needed for consensus are not stored in the object database.
This option is recommended for witnesses and seed-nodes.
To run a node with *all* the data (e.g. for supporting a content website)
that uses ca. 14GB of memory and growing:

### ENABLE_CONTENT_PATCHING=[ON/OFF]
docker run \
--env USE_WAY_TOO_MUCH_RAM=1 \
-d -p 2001:2001 -p 8090:8090 --name steemd-full \
steemit/steem

Allows content to be updated using a patch rather than a complete replacement.
If you do not need an API server or need to see the result of patching content then you can set this to OFF.
docker logs -f steemd-full

### CLEAR_VOTES=[ON/OFF]
# Seed Nodes

Clears old votes from memory that are not longer required for consensus.
A list of some seed nodes to get you started can be found in
[doc/seednodes.txt](doc/seednodes.txt).

### BUILD_STEEM_TESTNET=[OFF/ON]
This same file is baked into the docker images and can be overridden by
setting `STEEMD_SEED_NODES` in the container environment at `docker run`
time to a whitespace delimited list of seed nodes (with port).

Builds steemd for use in a private testnet. Also required for correctly building unit tests
# How to Mine

Testing
-------
The mining algorithm used by Steem requires the owner to have access to the
private key used by the account. This means it does not favor mining pools.

The unit test target is `make chain_test`
This creates an executable `./tests/chain_test` that will run all unit tests.
./steemd --miner=["accountname","${WIFPRIVATEKEY}"] \
--witness="accountname" --seed-node="52.38.66.234:2001"

Tests are broken in several categories:
```
basic_tests // Tests of "basic" functionality
block_tests // Tests of the block chain
live_tests // Tests on live chain data (currently only past hardfork testing)
operation_tests // Unit Tests of Steem operations
operation_time_tests // Tests of Steem operations that include a time based component (ex. vesting withdrawals)
serialization_tests // Tests related of serialization
```
Make sure that your accountname is unique and not already used by someone
else or your proof of work might not be accepted by the blockchain.

Code Coverage Testing
---------------------
# Building

If you have not done so, install lcov `brew install lcov`
See [doc/building.md](doc/building.md) for detailed build instructions, including
compile-time options, and specific commands for Linux (Ubuntu LTS) or macOS X.

```
cmake -D BUILD_STEEM_TESTNET=ON -D ENABLE_COVERAGE_TESTING=true -D CMAKE_BUILD_TYPE=Debug .
make
lcov --capture --initial --directory . --output-file base.info --no-external
tests/chain_test
lcov --capture --directory . --output-file test.info --no-external
lcov --add-tracefile base.info --add-tracefile test.info --output-file total.info
lcov -o interesting.info -r total.info tests/\*
mkdir -p lcov
genhtml interesting.info --output-directory lcov --prefix `pwd`
```
# Testing

Now open `lcov/index.html` in a browser
See [doc/testing.md](doc/testing.md) for test build targets and info
on how to use lcov to check code test coverage.
14 changes: 10 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
machine:
services:
- docker
services:
- docker

test:
dependencies:
cache_directories:
- "~/docker"
override:
- docker info
- docker build --rm=false -t steemit/steem .
- time bash tests/scripts/create-ci-docker-image.sh

test:
override:
- time docker build --rm=false -t steemitinc/steem-test -f Dockerfile.test .
43 changes: 22 additions & 21 deletions contrib/steemd.run
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,30 @@

export HOME="/var/lib/steemd"

STEEMD="/usr/local/steemd-default/bin/steemd"

if [[ "$USE_WAY_TOO_MUCH_RAM" ]]; then
STEEMD="/usr/local/steemd-full/bin/steemd"
fi

chown -R steemd:steemd $HOME

SEED_NODES="
52.38.66.234:2001
52.37.169.52:2001
52.26.78.244:2001
192.99.4.226:2001
46.252.27.1:1337
81.89.101.133:2001
52.4.250.181:39705
steemd.pharesim.me:2001
seed.steemed.net:2001
steem.clawmap.com:2001
seed.steemwitness.com:2001
steem-seed1.abit-more.com:2001
"
# seed nodes come from doc/seednodes.txt which is
# installed by docker into /etc/steemd/seednodes.txt
SEED_NODES="$(cat /etc/steemd/seednodes.txt | awk -F' ' '{print $1}')"

ARGS=""

# if user did not pass in any desired
# seed nodes, use the ones above:
if [[ -z "$STEEMD_SEED_NODES" ]]; then
for NODE in $SEED_NODES ; do
ARGS+=" --seed-node=$NODE"
done
fi

# if user did pass in desired seed nodes, use
# the ones the user specified:
if [[ ! -z "$STEEMD_SEED_NODES" ]]; then
for NODE in $STEEMD_SEED_NODES ; do
ARGS+=" --seed-node=$NODE"
Expand All @@ -52,12 +51,14 @@ cp /etc/steemd/config.ini $HOME/config.ini
chown steemd:steemd $HOME/config.ini

if [[ ! -d $HOME/blockchain ]]; then
# init with blockchain cached in image
ARGS+=" --replay-blockchain"
mkdir -p $HOME/blockchain/database
cd $HOME/blockchain/database
tar xvjpf /var/cache/steemd/blocks.tbz2
chown -R steemd:steemd $HOME/blockchain
if [[ -e /var/cache/steemd/blocks.tbz2 ]]; then
# init with blockchain cached in image
ARGS+=" --replay-blockchain"
mkdir -p $HOME/blockchain/database
cd $HOME/blockchain/database
tar xvjpf /var/cache/steemd/blocks.tbz2
chown -R steemd:steemd $HOME/blockchain
fi
fi

# without --data-dir it uses cwd as datadir(!)
Expand All @@ -68,7 +69,7 @@ cd $HOME
sleep 1

exec chpst -usteemd \
steemd \
$STEEMD \
--rpc-endpoint=0.0.0.0:8090 \
--p2p-endpoint=0.0.0.0:2001 \
--data-dir=$HOME \
Expand Down
Loading