Skip to content

Commit 7d1b315

Browse files
merge dev changes to current version to level up steemd
2 parents 4254312 + 496cb88 commit 7d1b315

1,847 files changed

Lines changed: 1714 additions & 520584 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-steemd.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build All steemd Dockerfiles
2+
3+
on:
4+
push:
5+
paths:
6+
- "deploy/**"
7+
- ".github/workflows/build-steemd.yml"
8+
9+
pull_request:
10+
11+
workflow_dispatch:
12+
13+
jobs:
14+
build-steemd:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: true
19+
matrix:
20+
dockerfile:
21+
- Dockerfile.azurelinux3.0
22+
- Dockerfile.debian13
23+
- Dockerfile.ubuntu20.04
24+
- Dockerfile.ubuntu22.04
25+
- Dockerfile.ubuntu24.04
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Build Docker image
32+
run: |
33+
set -ex
34+
35+
FILE="deploy/${{ matrix.dockerfile }}"
36+
NAME="${{ matrix.dockerfile }}"
37+
TAG="steem:${NAME#Dockerfile.}"
38+
39+
echo "Building Dockerfile: $FILE"
40+
echo "Tag: $TAG"
41+
42+
sudo -E docker build \
43+
--no-cache \
44+
--build-arg NUMBER_BUILD_THREADS=4 \
45+
--build-arg UNIT_TEST=ON \
46+
-t "$TAG" \
47+
-f "$FILE" \
48+
.

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@
77
[submodule "libraries/fc/vendor/websocketpp"]
88
path = libraries/fc/vendor/websocketpp
99
url = https://github.com/zaphoyd/websocketpp.git
10+
[submodule "libraries/vendor/rocksdb"]
11+
path = libraries/vendor/rocksdb
12+
url = https://github.com/facebook/rocksdb.git
13+
[submodule "libraries/fc/vendor/cyoencode"]
14+
path = libraries/fc/vendor/cyoencode
15+
url = https://github.com/calzakk/CyoEncode

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ project( Steem )
33
cmake_minimum_required( VERSION 3.2 )
44

55
set( BLOCKCHAIN_NAME "Steem" )
6-
set( CMAKE_CXX_STANDARD 14 )
6+
set( CMAKE_CXX_STANDARD 17 )
7+
set( CMAKE_CXX_STANDARD_REQUIRED ON )
8+
9+
add_compile_options(-Wno-error=sign-compare)
710

811
set( GUI_CLIENT_EXECUTABLE_NAME Steem )
912
set( CUSTOM_URL_SCHEME "gcs" )
@@ -153,12 +156,16 @@ IF( WIN32 )
153156
ENDIF(WIN32)
154157

155158
FIND_PACKAGE(Boost 1.58 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
159+
find_package(Threads REQUIRED)
156160

157161
if( NOT( Boost_VERSION LESS 106900 ) )
158162
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
159163
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
160164
endif()
161165

166+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
167+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
168+
162169
if( WIN32 )
163170

164171
message( STATUS "Configuring Steem on WIN32")

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Steem - The Blockchain That Will Tokenize The Web
2+
[![Build All steemd Dockerfiles](https://github.com/steemit/steem/actions/workflows/build-steemd.yml/badge.svg?branch=dev)](https://github.com/steemit/steem/actions/workflows/build-steemd.yml)
23

34
Welcome to the official repository for Steem, the blockchain that will revolutionize the web, and soon the blockchain for Smart Media Tokens!
45

5-
6-
76
Steem is the first blockchain which introduced the "Proof of Brain" social consensus algorithm for token allocation.
87

98
Being one of the most actively developed blockchain projects currently in existence, it's become fertile soil for entrepreneurial pursuits. It has also become home for many cryptocurrency centric projects.
@@ -47,13 +46,13 @@ Getting started with Steem is fairly simple. You can either choose to use docker
4746

4847
## Quickstart
4948

50-
Just want to get up and running quickly? We have pre-built Docker images for your convenience. More details are in our [Quickstart Guide](https://github.com/steemit/steem/blob/master/doc/exchangequickstart.md).
49+
Just want to get up and running quickly? We have pre-built Docker images for your convenience. More details are in our [Quickstart Guide](./doc/quickstart.md).
5150

5251
## Building
5352

54-
We **strongly** recommend using one of our pre-built Docker images or using Docker to build Steem. Both of these processes are described in the [Quickstart Guide](https://github.com/steemit/steem/blob/master/doc/exchangequickstart.md).
53+
We **strongly** recommend using one of our pre-built Docker images or using Docker to build Steem. Both of these processes are described in the [Building Steem](./doc/building.md)
5554

56-
But if you would still like to build from source, we also have [build instructions](https://github.com/steemit/steem/blob/master/doc/building.md) for Linux (Ubuntu LTS) and macOS.
55+
But if you would still like to build from source, we also have [build instructions](./doc/building.md) for Linux (Ubuntu LTS) and macOS.
5756

5857
## Dockerized P2P Node
5958

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ dependencies:
1111

1212
test:
1313
override:
14-
- time docker build --rm=false -t steemitinc/steem-test -f Dockerfile.test .
14+
- time docker build --rm=false -t steemitinc/steem-test -f deploy/Dockerfile.smoketests .

cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ steps:
1414
dir: "steem"
1515
args: [
1616
'build',
17-
'-f', '../Builder.DockerFile',
17+
'-f', '../deploy/Dockfile.ci.tests',
1818
'.'
1919
]
2020
options:

deploy/Dockerfile.azurelinux3.0

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS builder
2+
3+
# The default build params are for low memory mira version.
4+
# This usually are used as a witness node.
5+
ARG CMAKE_BUILD_TYPE=Release
6+
ARG STEEM_STATIC_BUILD=ON
7+
ARG ENABLE_MIRA=ON
8+
ARG LOW_MEMORY_MODE=ON
9+
ARG CLEAR_VOTES=ON
10+
ARG SKIP_BY_TX_ID=ON
11+
ARG BUILD_STEEM_TESTNET=OFF
12+
ARG ENABLE_COVERAGE_TESTING=OFF
13+
ARG CHAINBASE_CHECK_LOCKING=OFF
14+
ARG UNIT_TEST=OFF
15+
ARG DOXYGEN=OFF
16+
ARG BUILD_TESTING=ON
17+
ARG NUMBER_BUILD_THREADS
18+
19+
RUN echo "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}" >> /etc/build_info && \
20+
echo "STEEM_STATIC_BUILD: ${STEEM_STATIC_BUILD}" >> /etc/build_info && \
21+
echo "ENABLE_MIRA: ${ENABLE_MIRA}" >> /etc/build_info && \
22+
echo "LOW_MEMORY_MODE: ${LOW_MEMORY_MODE}" >> /etc/build_info && \
23+
echo "CLEAR_VOTES: ${CLEAR_VOTES}" >> /etc/build_info && \
24+
echo "SKIP_BY_TX_ID: ${SKIP_BY_TX_ID}" >> /etc/build_info && \
25+
echo "BUILD_STEEM_TESTNET: ${BUILD_STEEM_TESTNET}" >> /etc/build_info && \
26+
echo "ENABLE_COVERAGE_TESTING: ${ENABLE_COVERAGE_TESTING}" >> /etc/build_info && \
27+
echo "CHAINBASE_CHECK_LOCKING: ${CHAINBASE_CHECK_LOCKING}" >> /etc/build_info && \
28+
echo "UNIT_TEST: ${UNIT_TEST}" >> /etc/build_info && \
29+
echo "DOXYGEN: ${DOXYGEN}" >> /etc/build_info && \
30+
echo "NUMBER_BUILD_THREADS: ${THREADS}" >> /etc/build_info
31+
32+
ENV DEBIAN_FRONTEND=noninteractive
33+
34+
RUN tdnf update -y && \
35+
tdnf install -y \
36+
git \
37+
jq \
38+
gcc \
39+
gcc-c++ \
40+
make \
41+
cmake \
42+
openssl-devel \
43+
snappy-devel \
44+
python3 \
45+
python3-jinja2 \
46+
python3-devel \
47+
doxygen \
48+
autoconf \
49+
automake \
50+
util-linux \
51+
yajl-devel \
52+
readline-devel \
53+
libtool \
54+
lz4-devel \
55+
xz-devel \
56+
ncurses-devel \
57+
gflags-devel \
58+
zlib-devel \
59+
bzip2-devel \
60+
zstd-devel \
61+
ncurses-compat \
62+
wget \
63+
gcc \
64+
g++ \
65+
glibc \
66+
binutils \
67+
glibc-devel \
68+
perl \
69+
which \
70+
tar \
71+
findutils \
72+
diffutils \
73+
gawk \
74+
kernel-headers \
75+
ncurses-compat \
76+
patch && \
77+
tdnf install -y ca-certificates curl && \
78+
update-ca-trust
79+
80+
## Build Boost 1.78 (required by Steem)
81+
## Azure Linux 3.0 does not have a fixed default version of the Boost C++ Libraries.
82+
RUN set -e && \
83+
BOOST_VERSION_DOT=1.78.0 && \
84+
BOOST_VERSION_UNDERSCORE=1_78_0 && \
85+
BOOST_URL="https://archives.boost.io/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION_UNDERSCORE}.tar.gz" && \
86+
BOOST_SHA256="94ced8b72956591c4775ae2207a9763d3600b30d9d7446562c552f0a14a63be7" && \
87+
wget -q "${BOOST_URL}" -O boost_${BOOST_VERSION_UNDERSCORE}.tar.gz && \
88+
echo "${BOOST_SHA256} boost_${BOOST_VERSION_UNDERSCORE}.tar.gz" | sha256sum -c - && \
89+
tar -xvzf boost_${BOOST_VERSION_UNDERSCORE}.tar.gz && \
90+
cd boost_${BOOST_VERSION_UNDERSCORE} && \
91+
./bootstrap.sh --prefix=/usr/local --with-toolset=gcc || { cat bootstrap.log; exit 1; } && \
92+
./b2 -j"$(nproc)" toolset=gcc install || { cat bootstrap.log; exit 1; } && \
93+
cd .. && rm -rf boost_${BOOST_VERSION_UNDERSCORE} boost_${BOOST_VERSION_UNDERSCORE}.tar.gz
94+
95+
# Ensure make is available as gmake if needed
96+
RUN ln -s /usr/bin/make /usr/bin/gmake
97+
98+
WORKDIR /usr/local/src
99+
ADD . /usr/local/src
100+
101+
RUN pwd && \
102+
git submodule update --init --recursive && \
103+
cd libraries/fc/vendor/websocketpp && \
104+
(git apply /usr/local/src/patches/websocketpp-patch-ini-asio.patch || echo "Patch already applied or failed")
105+
106+
RUN cd libraries/vendor/rocksdb && \
107+
(git apply /usr/local/src/patches/rocksdb-cmake.patch || echo "Patch already applied or cannot apply")
108+
109+
RUN mkdir -p build && \
110+
cd build && \
111+
cmake \
112+
-DCMAKE_INSTALL_PREFIX=/usr/local/steemd \
113+
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
114+
-DLOW_MEMORY_NODE=${LOW_MEMORY_MODE} \
115+
-DBUILD_TESTING=${BUILD_TESTING} \
116+
-DCLEAR_VOTES=${CLEAR_VOTES} \
117+
-DSKIP_BY_TX_ID=${SKIP_BY_TX_ID} \
118+
-DBUILD_STEEM_TESTNET=${BUILD_STEEM_TESTNET} \
119+
-DENABLE_COVERAGE_TESTING=${ENABLE_COVERAGE_TESTING} \
120+
-DCHAINBASE_CHECK_LOCKING=${CHAINBASE_CHECK_LOCKING} \
121+
-DENABLE_MIRA=${ENABLE_MIRA} \
122+
-DSTEEM_STATIC_BUILD=${STEEM_STATIC_BUILD} \
123+
..
124+
125+
RUN cd build && \
126+
make -j$( [ -n "$NUMBER_BUILD_THREADS" ] \
127+
&& echo "$NUMBER_BUILD_THREADS" \
128+
|| echo $(( $(nproc) > 1 ? $(nproc) - 1 : 1 )) )
129+
130+
RUN cd build && \
131+
make install
132+
133+
RUN if [ "${UNIT_TEST}" = "ON" ] ; then \
134+
./tests/scripts/run_unit_tests.sh ; \
135+
else \
136+
echo "Skipping unit tests as UNIT_TEST is set to OFF" ; \
137+
fi
138+
139+
RUN if [ "${DOXYGEN}" = "ON" ] ; then \
140+
doxygen && \
141+
PYTHONPATH=programs/build_helpers \
142+
python3 -m steem_build_helpers.check_reflect && \
143+
programs/build_helpers/get_config_check.sh; \
144+
fi
145+
146+
FROM mcr.microsoft.com/azurelinux/base/core:3.0
147+
148+
ARG CMAKE_BUILD_TYPE=Release
149+
ARG STEEM_STATIC_BUILD=ON
150+
ARG ENABLE_MIRA=ON
151+
ARG LOW_MEMORY_MODE=ON
152+
ARG CLEAR_VOTES=ON
153+
ARG SKIP_BY_TX_ID=ON
154+
ARG BUILD_STEEM_TESTNET=OFF
155+
ARG ENABLE_COVERAGE_TESTING=OFF
156+
ARG CHAINBASE_CHECK_LOCKING=OFF
157+
ARG DOXYGEN=OFF
158+
159+
RUN echo "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}" >> /etc/build_info && \
160+
echo "STEEM_STATIC_BUILD: ${STEEM_STATIC_BUILD}" >> /etc/build_info && \
161+
echo "ENABLE_MIRA: ${ENABLE_MIRA}" >> /etc/build_info && \
162+
echo "LOW_MEMORY_MODE: ${LOW_MEMORY_MODE}" >> /etc/build_info && \
163+
echo "CLEAR_VOTES: ${CLEAR_VOTES}" >> /etc/build_info && \
164+
echo "SKIP_BY_TX_ID: ${SKIP_BY_TX_ID}" >> /etc/build_info && \
165+
echo "BUILD_STEEM_TESTNET: ${BUILD_STEEM_TESTNET}" >> /etc/build_info && \
166+
echo "ENABLE_COVERAGE_TESTING: ${ENABLE_COVERAGE_TESTING}" >> /etc/build_info && \
167+
echo "DOXYGEN: ${DOXYGEN}" >> /etc/build_info
168+
169+
COPY --from=builder /usr/local/steemd /usr/local/steemd
170+
WORKDIR /var/steem
171+
VOLUME [ "/var/steem" ]
172+
RUN tdnf update -y && \
173+
tdnf install -y snappy-devel ncurses-compat readline-devel && \
174+
tdnf autoremove -y && \
175+
tdnf clean all
176+
177+
## make steemd available on $PATH
178+
ENV PATH="/usr/local/steemd/bin:${PATH}"
179+
180+
CMD ["cat", "/etc/build_info"]
Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM phusion/baseimage:0.9.19
1+
FROM ubuntu:18.04
22

33
RUN \
44
apt-get update && \
@@ -31,9 +31,8 @@ RUN \
3131

3232
ADD . /usr/local/src/steem
3333

34-
RUN \
35-
cd /usr/local/src/steem && \
36-
mkdir build && \
34+
RUN cd /usr/local/src/steem && \
35+
mkdir -p build && \
3736
cd build && \
3837
cmake \
3938
-DCMAKE_BUILD_TYPE=Release \
@@ -42,10 +41,15 @@ RUN \
4241
-DLOW_MEMORY_NODE=OFF \
4342
-DCLEAR_VOTES=ON \
4443
-DSKIP_BY_TX_ID=ON \
45-
.. && \
46-
make -j16 && \
47-
./tests/chain_test && \
48-
./tests/plugin_test && \
49-
./programs/util/test_fixed_string
44+
..
45+
46+
RUN cd /usr/local/src/steem/build && make -j
5047

48+
RUN cd /usr/local/src/steem/build && \
49+
./tests/chain_test
5150

51+
RUN cd /usr/local/src/steem/build && \
52+
./tests/plugin_test
53+
54+
RUN cd /usr/local/src/steem/build && \
55+
./programs/util/test_fixed_string

0 commit comments

Comments
 (0)