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

Release/v1.12.1 #2915

Open
wants to merge 166 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
81aa459
Merge pull request #2820 from Taraxa-project/master
JakubFornadel Jul 31, 2024
193a846
improve pillar block unit tests
JakubFornadel Jul 27, 2024
fc44927
save the minimum amount of pillar votes into db
JakubFornadel Jul 29, 2024
11cf86f
improve proposed pbft blocks cleanup test
JakubFornadel Aug 6, 2024
153ae46
chore: dag block proposal limit
mfrankovi Aug 12, 2024
4e82fcb
Merge pull request #2827 from Taraxa-project/dag_prod
MatusKysel Aug 13, 2024
10f4c28
Merge pull request #2831 from Taraxa-project/master
MatusKysel Aug 15, 2024
7afb545
first try of optimization
MatusKysel Aug 19, 2024
7f4d7ab
Merge pull request #2834 from Taraxa-project/master
MatusKysel Aug 20, 2024
cec4060
Merge branch 'develop' into db-opt
MatusKysel Aug 20, 2024
cb49ed8
add more funcions to fully sync on mainnet
MatusKysel Aug 20, 2024
f76821d
cppcheck improvements
MatusKysel Aug 20, 2024
c91c17d
chore: add rpc for retrieving nodes versions
mfrankovi Aug 12, 2024
6a94d03
Merge pull request #2830 from Taraxa-project/node_versions
mfrankovi Aug 23, 2024
6829fdb
Merge pull request #2838 from Taraxa-project/master
MatusKysel Aug 23, 2024
a52a6d2
refactor FinalChain class
JakubFornadel Aug 6, 2024
a02be02
Merge pull request #2823 from Taraxa-project/final_chain_refactor
kstdl Aug 23, 2024
8bdefad
chore: use values from config for classes constructing
kstdl Aug 19, 2024
9becf1f
chore: optimize includes and usings
kstdl Aug 20, 2024
9ebb5cd
Merge pull request #2835 from Taraxa-project/refactor
kstdl Aug 26, 2024
e9ed4bf
add support of ranges
MatusKysel Aug 26, 2024
c0a10c8
fix storage
MatusKysel Aug 26, 2024
b53b5d9
refactor blocking dependencies processing so it is not possible to fo…
JakubFornadel Aug 29, 2024
e3767eb
Revert "add support of ranges"
MatusKysel Aug 30, 2024
4c683ba
Merge branch 'develop' into db-opt
MatusKysel Aug 30, 2024
8f088da
change to batches
MatusKysel Aug 30, 2024
9373f56
add new handlers
MatusKysel Aug 30, 2024
954ccd1
fix tests and formating
MatusKysel Aug 30, 2024
d5e77b1
fix tarcap version
MatusKysel Aug 30, 2024
f51810c
fixed tests
MatusKysel Aug 30, 2024
c269e7d
fix final chain tests
MatusKysel Aug 30, 2024
9b93865
chore: handle transactions with no account
mfrankovi Sep 1, 2024
972930c
Merge pull request #2843 from Taraxa-project/trx_na_ins
mfrankovi Sep 3, 2024
25eea9d
chore:queue limit improvements
mfrankovi Aug 28, 2024
8e6194b
Merge branch 'develop' into issue-2769/refactor_blocking_dependencies
JakubFornadel Sep 4, 2024
3799637
Merge pull request #2841 from Taraxa-project/ddos_impr
mfrankovi Sep 5, 2024
0e1480d
review comments
MatusKysel Sep 5, 2024
611dcfb
fix review comments
MatusKysel Sep 5, 2024
7303d2e
Merge branch 'develop' into db-opt
MatusKysel Sep 5, 2024
f6ea9a0
Merge pull request #2839 from Taraxa-project/db-opt
MatusKysel Sep 5, 2024
a0b3c43
chore: dont save duplicate data in finalChainHeader
kstdl Aug 27, 2024
1378445
chore: optimize migration
kstdl Aug 29, 2024
cf8d0a1
Merge pull request #2844 from Taraxa-project/final_chain_header
kstdl Sep 5, 2024
92d8def
support multiple undelegagtions
JakubFornadel Jun 16, 2024
d63083b
update evm
JakubFornadel Aug 27, 2024
d2937cf
check if dag transactions senders exist
JakubFornadel Aug 27, 2024
b9fdfed
check old proposed blocks presence
JakubFornadel Aug 27, 2024
16d306a
Revert "check if dag transactions senders exist"
JakubFornadel Aug 29, 2024
a1ecbdc
Merge branch 'develop' into issue-2769/refactor_blocking_dependencies
JakubFornadel Sep 5, 2024
fefa5ab
Merge pull request #2842 from Taraxa-project/issue-2769/refactor_bloc…
JakubFornadel Sep 5, 2024
9c9c25d
Merge branch 'develop' into pillar_tests
JakubFornadel Sep 6, 2024
2e3dd01
use named constants in test
JakubFornadel Sep 6, 2024
9e5f4a9
fix votes_count_changes pillar test
JakubFornadel Sep 6, 2024
b212294
Merge pull request #2814 from Taraxa-project/pillar_tests
JakubFornadel Sep 6, 2024
492dcb4
fix undelegate compatibility
JakubFornadel Sep 12, 2024
f4ddc2b
Merge branch 'develop' into cornus_hf
JakubFornadel Sep 12, 2024
59a1913
Merge pull request #2788 from Taraxa-project/cornus_hf
JakubFornadel Sep 12, 2024
473a820
fix: gossip votes to all capability version
mfrankovi Sep 12, 2024
57f15cb
Merge pull request #2849 from Taraxa-project/vote_gossip_cap_ver
kstdl Sep 13, 2024
80120be
chore: rename pbft_block prev_state_root to final_chain_hash
kstdl Aug 27, 2024
dc7c17b
feat: use final chain block hash instead of state root after cornus hf
kstdl Sep 6, 2024
19cc948
fix: period dags migration memory consumption
kstdl Sep 10, 2024
bbe761d
chore: rename period dags migration
kstdl Sep 10, 2024
9491cee
update taraxa-evm submodule with latest develop
kstdl Sep 13, 2024
0f95193
Merge pull request #2848 from Taraxa-project/change_final_chain_hash
mfrankovi Sep 13, 2024
64beae6
chore: update to rocksdb9
kstdl Sep 17, 2024
31a2e01
Merge pull request #2851 from Taraxa-project/conan_rocksdb
kstdl Sep 23, 2024
08ca49a
fix: dag block bundle
mfrankovi Sep 18, 2024
009531f
Merge pull request #2852 from Taraxa-project/dag_encode_uint
mfrankovi Sep 23, 2024
dc7ce5c
fix: remove undelegations v2
mfrankovi Sep 20, 2024
ea420d6
Merge pull request #2853 from Taraxa-project/fix_remove_undel
mfrankovi Sep 23, 2024
5c33303
bugfix: split pillar vote packet to serverl ones
MatusKysel Sep 23, 2024
2d66b0c
chore: increase version and add cornus_hf block to testnet genesis
kstdl Sep 25, 2024
f530b50
chore: update testnet cornus block number
kstdl Sep 26, 2024
2fbcedb
Merge pull request #2856 from Taraxa-project/testnet-release
kstdl Sep 26, 2024
42560c0
chore: dag block proposal limit
mfrankovi Aug 12, 2024
d69a25b
Merge remote-tracking branch 'origin/develop' into testnet
kstdl Sep 26, 2024
43be8be
chore: update to latest dependecies
MatusKysel Sep 26, 2024
7667f49
update cpp-check
MatusKysel Sep 27, 2024
b81ba77
chore: add period to error output
MatusKysel Sep 27, 2024
58ecf15
revert change of dpos bytecode
MatusKysel Sep 29, 2024
3c1d6c1
update evm
MatusKysel Sep 29, 2024
2646f52
fix the tests
MatusKysel Sep 30, 2024
d3167b9
update evm
MatusKysel Sep 30, 2024
1bb8a52
Merge pull request #2860 from Taraxa-project/fix-cornus
MatusKysel Sep 30, 2024
8fb0014
chore: additional check on ws
MatusKysel Sep 30, 2024
69ec027
update HF number
MatusKysel Sep 30, 2024
9db9cc3
Merge pull request #2858 from Taraxa-project/cornus_testnet
rattrap Sep 30, 2024
f3beac2
Merge pull request #2861 from Taraxa-project/add-check-on-ws
MatusKysel Oct 1, 2024
6294470
fix cpp check
MatusKysel Oct 2, 2024
9e64480
Merge branch 'develop' into update-dependencies
MatusKysel Oct 2, 2024
05b9990
chore: rpc requests limit
mfrankovi Oct 3, 2024
fc874b6
Merge pull request #2863 from Taraxa-project/rpc_limit
mfrankovi Oct 9, 2024
29b3b8f
Merge branch 'develop' into update-dependencies
MatusKysel Oct 14, 2024
a38518c
Merge pull request #2859 from Taraxa-project/update-dependencies
MatusKysel Oct 14, 2024
94878bf
fix: tracing execution block number
kstdl Oct 11, 2024
aaa7f70
Merge pull request #2864 from Taraxa-project/fix_trace
kstdl Oct 14, 2024
d8e2f09
chore: fix log lvl
MatusKysel Oct 16, 2024
fef9c9d
feat: add function to check disk size on startup
MatusKysel Oct 16, 2024
db9a9cf
clang format
MatusKysel Oct 16, 2024
bb22fd5
removed old file
MatusKysel Oct 16, 2024
409359c
Merge pull request #2872 from Taraxa-project/fix-log-lvl
MatusKysel Oct 18, 2024
75aec2e
Merge branch 'develop' into testnet
kstdl Oct 21, 2024
409ac0b
Merge pull request #2874 from Taraxa-project/testnet
kstdl Oct 21, 2024
e1511c3
rework move semantics little bit
MatusKysel Oct 29, 2024
1a8277c
fix locks
MatusKysel Oct 30, 2024
bfa3f7e
Merge pull request #2877 from Taraxa-project/fix-potencial-issue-with…
MatusKysel Oct 30, 2024
13fa82b
fix: pillar block save
mfrankovi Oct 31, 2024
dbba04e
Merge pull request #2882 from Taraxa-project/pillar_sav
mfrankovi Nov 4, 2024
4dcc45b
dag proposal improvement
mfrankovi Oct 25, 2024
469560e
Merge pull request #2876 from Taraxa-project/dag_lmt_tst
mfrankovi Nov 7, 2024
359bf3b
Merge branch 'develop' into filesyste-size-check
MatusKysel Nov 7, 2024
fabe5ad
Merge pull request #2873 from Taraxa-project/filesyste-size-check
MatusKysel Nov 7, 2024
663766d
separate packets parsing from handlers
JakubFornadel Sep 26, 2024
5e4eec7
implement NET VERSION 5 tarcap
JakubFornadel Oct 14, 2024
dd79d79
fix statusPacket rlp parsing
JakubFornadel Oct 15, 2024
a09eef6
fix packets rlp encoding/decoding
JakubFornadel Oct 16, 2024
31696f9
simplify new packets handlers code
JakubFornadel Oct 18, 2024
6558e33
fix tarcap threadpool test
JakubFornadel Oct 21, 2024
b8b3acc
use optimized rlp format for votes bundles
JakubFornadel Oct 29, 2024
c289cfb
refactor periodData getter + fix votes_bundle processing
JakubFornadel Oct 30, 2024
a186423
adjust pillar votes bundle packet
JakubFornadel Nov 2, 2024
1f6ce14
refactor dag blocks processing to work with shared pointers to avoid …
JakubFornadel Nov 2, 2024
18f1967
remove unused constants
JakubFornadel Nov 5, 2024
a9f9cf2
fix dag block packet double sending of txs, optimize packets ctors
JakubFornadel Nov 11, 2024
82cb70b
fix transaction packet
JakubFornadel Nov 8, 2024
846610c
mark received tx as known for the peer
JakubFornadel Nov 11, 2024
1cd58bb
fix transacion packet sending
JakubFornadel Nov 13, 2024
b9a1069
post merge fixes
JakubFornadel Nov 13, 2024
ed975e0
Merge pull request #2862 from Taraxa-project/issue-1830/packets-encoding
JakubFornadel Nov 13, 2024
ed13008
chore: trusted nodes
mfrankovi Nov 22, 2024
154cda3
Merge pull request #2892 from Taraxa-project/trusted_nodes
mfrankovi Nov 25, 2024
980df69
chore: update to latest develop
MatusKysel Nov 26, 2024
ce7c720
Merge pull request #2895 from Taraxa-project/update-evm
MatusKysel Nov 26, 2024
7453615
update evm
MatusKysel Nov 26, 2024
2c4008b
Merge pull request #2897 from Taraxa-project/new-evm
MatusKysel Nov 26, 2024
b1c4ab2
Update version to 1.12.1
mfrankovi Nov 14, 2024
5c8c0f4
fix: state during the tracing
kstdl Nov 22, 2024
010d990
Merge pull request #2899 from Taraxa-project/testnet_dev
kstdl Nov 28, 2024
5da06fb
implement sequoia hardfork
JakubFornadel Nov 26, 2024
0f36f1a
make locking period change part of cornus hardfork
JakubFornadel Nov 28, 2024
1db415f
adjust configs
JakubFornadel Nov 28, 2024
04d8d20
update evm
JakubFornadel Dec 2, 2024
c430fee
Merge remote-tracking branch 'origin/master' into master_develop
kstdl Dec 2, 2024
9cbf49a
Merge pull request #2902 from Taraxa-project/delegation_locking_perio…
JakubFornadel Dec 2, 2024
785b873
Merge branch 'develop' into master_develop
kstdl Dec 2, 2024
2bc913f
chore: increase gas limit
mfrankovi Nov 28, 2024
0855c6e
fix: bug after the merge
kstdl Dec 2, 2024
b4a09bc
Merge pull request #2901 from Taraxa-project/propose_gas_limit
mfrankovi Dec 2, 2024
dec30a8
Merge branch 'develop' into master_develop
kstdl Dec 2, 2024
3ebcd12
Merge pull request #2903 from Taraxa-project/master_develop
MatusKysel Dec 2, 2024
871609d
fix multiple tarcaps
JakubFornadel Dec 3, 2024
94c6ee8
Merge pull request #2906 from Taraxa-project/multiple_tarcaps_support
JakubFornadel Dec 3, 2024
69a4484
fix: propose gas limit validation
mfrankovi Dec 3, 2024
6ac9d82
Merge pull request #2907 from Taraxa-project/propose_gas_limit_fix
mfrankovi Dec 4, 2024
478fc88
chore: new testnet
MatusKysel Dec 4, 2024
5673b76
fix: no balance duplicate transaction
mfrankovi Dec 12, 2024
4fef314
Merge pull request #2912 from Taraxa-project/no_balance_nonce
mfrankovi Dec 16, 2024
825d844
chore: update evm
MatusKysel Dec 17, 2024
a5b8fa6
update block number
MatusKysel Dec 17, 2024
92005e1
chore: merge v4 and v5 network version to same version
mfrankovi Dec 18, 2024
b3be723
Merge pull request #2916 from Taraxa-project/net_v3_to_v4
MatusKysel Dec 18, 2024
23be179
chore: update bulding instructions
MatusKysel Dec 18, 2024
c3e1b11
Merge pull request #2917 from Taraxa-project/update-building
MatusKysel Dec 18, 2024
a041af7
remove testnet branch from building instructions
MatusKysel Dec 18, 2024
1bdb67d
fix building instructions
MatusKysel Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 5 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ cmake_minimum_required(VERSION 3.20)

# Set current version of the project
set(TARAXA_MAJOR_VERSION 1)
set(TARAXA_MINOR_VERSION 11)
set(TARAXA_PATCH_VERSION 4)
set(TARAXA_MINOR_VERSION 12)
set(TARAXA_PATCH_VERSION 1)
set(TARAXA_VERSION ${TARAXA_MAJOR_VERSION}.${TARAXA_MINOR_VERSION}.${TARAXA_PATCH_VERSION})

# Any time a change in the network protocol is introduced this version should be increased
set(TARAXA_NET_VERSION 3)
set(TARAXA_NET_VERSION 4)
# Major version is modified when DAG blocks, pbft blocks and any basic building blocks of our blockchain is modified
# in the db
set(TARAXA_DB_MAJOR_VERSION 1)
Expand All @@ -32,7 +32,8 @@ add_compile_options(-Wall
-Wextra-semi
-Wnull-dereference
-Wno-unknown-pragmas
-Wno-overlength-strings)
-Wno-overlength-strings
-Wno-switch)
# Set the position independent code property on all targets
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

Expand Down Expand Up @@ -217,9 +218,6 @@ find_package(MPFR)
set(JSONCPP_INCLUDE_DIR ${CONAN_INCLUDE_DIRS_JSONCPP})
include(ProjectJSONRPCCPP)

# rocksdb build
include(${PROJECT_SOURCE_DIR}/CMakeModules/rocksdb.cmake)

# Add sub-directories cmakes
add_subdirectory(submodules)
add_subdirectory(libraries)
Expand Down
2 changes: 1 addition & 1 deletion CMakeModules/cpp_graphql_gen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(Boost_NO_WARN_NEW_VERSIONS 1)
FetchContent_Declare(
cppgraphqlgen
GIT_REPOSITORY https://github.com/microsoft/cppgraphqlgen.git
GIT_TAG v4.5.6
GIT_TAG v4.5.8
GIT_SHALLOW TRUE
)
set(GRAPHQL_BUILD_TESTS OFF)
Expand Down
10 changes: 9 additions & 1 deletion CMakeModules/cppcheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ else ()
COMMAND ${CPP_CHECK_EXE}
--error-exitcode=1
--enable=all
--check-level=exhaustive
--suppress=missingInclude
--suppress=missingIncludeSystem
# find_if - useless here
Expand All @@ -19,14 +20,20 @@ else ()
# false positive
--suppress=uninitMemberVar:${PROJECT_SOURCE_DIR}/*/UPnP.cpp
# This is only enabled because of test functions and false positives
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/Eth.cpp
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/Common.cpp
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/Base64.cpp
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/util.cpp
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/vrf_wrapper.cpp
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/UPnP.cpp
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/logger.cpp
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/state_api.cpp
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/watches.hpp
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/vector_ref.h
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/RLP.h
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/FixedHash.h
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/CommonData.h
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/Common.h
--suppress=unusedFunction:${PROJECT_SOURCE_DIR}/*/Log.h
# TODO remove this when we solve correct exit of programs
--suppress=localMutex:${PROJECT_SOURCE_DIR}/*/main.cpp
# Just style warning
Expand All @@ -38,6 +45,7 @@ else ()
--suppress=unmatchedSuppression:${PROJECT_SOURCE_DIR}/*/Common.h
--suppress=cstyleCast:${PROJECT_SOURCE_DIR}/*/vector_ref.h
--suppress=cstyleCast:${PROJECT_SOURCE_DIR}/*/Common.h
--suppress=cstyleCast:${PROJECT_SOURCE_DIR}/*/transaction.cpp
# not an issue here
--suppress=virtualCallInConstructor:${PROJECT_SOURCE_DIR}/*/final_chain.cpp
# just a warning
Expand Down
32 changes: 0 additions & 32 deletions CMakeModules/rocksdb.cmake

This file was deleted.

15 changes: 9 additions & 6 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ class TaraxaConan(ConanFile):
generators = "cmake"

def requirements(self):
self.requires("boost/1.85.0")
self.requires("cppcheck/2.12") #TODO(2.14.1)
self.requires("openssl/3.2.1")
self.requires("boost/1.86.0")
self.requires("cppcheck/2.15.0")
self.requires("openssl/3.3.2")
self.requires("cryptopp/8.9.0")
self.requires("gtest/1.14.0")
self.requires("lz4/1.9.4")
self.requires("prometheus-cpp/1.1.0")
self.requires("gtest/1.15.0")
self.requires("lz4/1.10.0")
self.requires("rocksdb/9.2.1")
self.requires("prometheus-cpp/1.2.4")
self.requires("jsoncpp/1.9.5")

def _configure_boost_libs(self):
Expand Down Expand Up @@ -60,6 +61,8 @@ def configure(self):
self.options["gtest"].build_gmock = False
# this links cppcheck to prce library
self.options["cppcheck"].have_rules = False
self.options["rocksdb"].use_rtti = True
self.options["rocksdb"].with_lz4 = True
# mpir is required by cppcheck and it causing gmp confict
self.options["mpir"].enable_gmpcompat = False

Expand Down
174 changes: 10 additions & 164 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ will build out of the box without further effort:
autoconf \
ccache \
cmake \
clang \
clang-format-17 \
clang-tidy-17 \
llvm-17 \
golang-go \
python3-full \
# this libs are required for arm build by go part. you can skip it for amd64 build
libzstd-dev \
libsnappy-dev \
rapidjson-dev \
Expand All @@ -47,7 +47,7 @@ will build out of the box without further effort:

### Clone the Repository

git clone https://github.com/Taraxa-project/taraxa-node.git --branch testnet
git clone https://github.com/Taraxa-project/taraxa-node.git
cd taraxa-node
git submodule update --init --recursive

Expand All @@ -62,180 +62,26 @@ will build out of the box without further effort:
&& conan profile update settings.compiler.libcxx=libstdc++11 clang \
&& conan profile update settings.build_type=RelWithDebInfo clang \
&& conan profile update env.CC=clang-17 clang \
&& conan profile update env.CXX=clang++-17 clang \
&& conan install --build missing -pr=clang .
&& conan profile update env.CXX=clang++-17 clang

# Compile project using cmake
mkdir cmake-build
cd cmake-build
cmake -DCONAN_PROFILE=clang -DCMAKE_BUILD_TYPE=RelWithDebInfo -DTARAXA_ENABLE_LTO=OFF -DTARAXA_STATIC_BUILD=OFF ../
make -j$(nproc)

## Building on Ubuntu 22.04
For Ubuntu 22.04 users, after installing the right packages with `apt` taraxa-node
will build out of the box without further effort:

### Install taraxa-node dependencies:

# Required packages
sudo apt-get install -y \
libtool \
autoconf \
ccache \
cmake \
clang-format-14 \
clang-tidy-14 \
golang-go \
python3-pip \
# this libs are required for arm build by go part. you can skip it for amd64 build
libzstd-dev \
libsnappy-dev \
rapidjson-dev \
libgmp-dev \
libmpfr-dev \
libmicrohttpd-dev

# Optional. Needed to run py_test. This won't install on arm64 OS because package is missing in apt
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt install solc

# Install conan package manager
sudo python3 -m pip install conan==1.64.1

# Setup clang as default compiler either in your IDE or by env. variables"
export CC="clang-14"
export CXX="clang++-14"

### Clone the Repository

git clone https://github.com/Taraxa-project/taraxa-node.git --branch testnet
cd taraxa-node
git submodule update --init --recursive

### Compile

# Optional - one time action
# Create clang profile
# It is recommended to use clang because on other compilers you could face some errors
conan profile new clang --detect && \
conan profile update settings.compiler=clang clang && \
conan profile update settings.compiler.version=14 clang && \
conan profile update settings.compiler.libcxx=libstdc++11 clang && \
conan profile update env.CC=clang-14 clang && \
conan profile update env.CXX=clang++-14 clang

# Export needed var for conan
export CONAN_REVISIONS_ENABLED=1

# Compile project using cmake
mkdir cmake-build
cd cmake-build
cmake -DCONAN_PROFILE=clang -DCMAKE_BUILD_TYPE=RelWithDebInfo -DTARAXA_ENABLE_LTO=OFF -DTARAXA_STATIC_BUILD=OFF ../
make -j$(nproc)

## Building on Ubuntu 20.04
For Ubuntu 20.04 users, after installing the right packages with `apt` taraxa-node
will build out of the box without further effort:

### Install taraxa-node dependencies:

# Required packages
sudo apt-get install -y \
libtool \
autoconf \
ccache cmake gcc g++ clang-format clang-tidy cppcheck \
libgflags-dev\
libjsoncpp-dev \
libjsonrpccpp-dev \
python3-pip \
rapidjson-dev \
libgmp-dev \
libmpfr-dev \
libmicrohttpd-dev


# Install conan package manager
# >= 1.36.0 version is required to work properly with clang-14
sudo python3 -m pip install conan==1.60.0

# Install cmake
# >= 3.20 version is required for JSON subcommand
# Setup your IDE accordingly to use this version
sudo python3 -m pip install cmake

# Go (required)
curl -LO https://go.dev/dl/go1.22.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.22.2.linux-amd64.tar.gz
rm -rf go1.22.2.linux-amd64.tar.gz

# Add go to PATH
# Add these env. variables to the ~/.profile to persist go settings even after restart
export GOROOT=/usr/local/go
export GOPATH=$HOME/.go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

# Optional
# We are using clang from llvm toolchain as default compiler as well as clang-format and clang-tidy
# It is possible to build taraxa-node also with other C++ compilers but to contribute to the official repo,
# changes must pass clang-format/clang-tidy checks for which we internally use llvm version=13
# To install llvm:
sudo su

curl -SL -o llvm.sh https://apt.llvm.org/llvm.sh && \
chmod +x llvm.sh && \
./llvm.sh 14 && \
apt-get install -y clang-format-14 clang-tidy-14 && \
rm -f llvm.sh

# Setup clang as default compiler either in your IDE or by env. variables"
export CC="clang-14"
export CXX="clang++-14"

### Clone the Repository

git clone https://github.com/Taraxa-project/taraxa-node.git --branch testnet
cd taraxa-node
git submodule update --init --recursive

### Compile

# Optional - one time action
# Create clang profile
# It is recommended to use clang because on other compilers you could face some errors
conan profile new clang --detect && \
conan profile update settings.compiler=clang clang && \
conan profile update settings.compiler.version=14 clang && \
conan profile update settings.compiler.libcxx=libstdc++11 clang && \
conan profile update env.CC=clang-14 clang && \
conan profile update env.CXX=clang++-14 clang

# Export needed var for conan
export CONAN_REVISIONS_ENABLED=1

# Compile project using cmake
mkdir cmake-build
cd cmake-build
cmake -DCONAN_PROFILE=clang -DCMAKE_BUILD_TYPE=RelWithDebInfo -DTARAXA_ENABLE_LTO=OFF -DTARAXA_STATIC_BUILD=OFF ../
make -j$(nproc)

And optional:

# optional
make install # defaults to /usr/local

## Building on MacOS

### Install taraxa-node dependencies:

First you need to get (Brew)[https://brew.sh/] package manager. After that you need tot install dependencies with it. Clang-14 is used for compilation.
First you need to get (Brew)[https://brew.sh/] package manager. After that you need tot install dependencies with it. Clang-17 is used for compilation.

brew update
brew install coreutils go autoconf automake gflags git libtool llvm@14 make pkg-config cmake conan snappy zstd rapidjson gmp mpfr libmicrohttpd
brew install coreutils go autoconf automake gflags git libtool llvm@17 make pkg-config cmake conan snappy zstd rapidjson gmp mpfr libmicrohttpd

### Clone the Repository

git clone https://github.com/Taraxa-project/taraxa-node.git --branch testnet
git clone https://github.com/Taraxa-project/taraxa-node.git
cd taraxa-node
git submodule update --init --recursive

Expand All @@ -245,8 +91,8 @@ First you need to get (Brew)[https://brew.sh/] package manager. After that you n
# It is recommended to use clang because on other compilers you could face some errors
conan profile new clang --detect && \
conan profile update settings.compiler=clang clang && \
conan profile update settings.compiler.version=14 clang && \
conan profile update settings.compiler.compiler.cppstd=14
conan profile update settings.compiler.version=17 clang && \
conan profile update settings.compiler.compiler.cppstd=17
conan profile update settings.compiler.libcxx=libc++ clang && \
conan profile update env.CC=clang clang && \
conan profile update env.CXX=clang++ clang
Expand Down Expand Up @@ -304,7 +150,7 @@ You should be able to build project following default MacOS building process. Bu

### Clone the Repository

git clone https://github.com/Taraxa-project/taraxa-node.git --branch testnet
git clone https://github.com/Taraxa-project/taraxa-node.git
cd taraxa-node
git submodule update --init --recursive

Expand All @@ -316,7 +162,7 @@ You should be able to build project following default MacOS building process. Bu
# It output should be equal to `i386`
conan profile new clang --detect && \
conan profile update settings.compiler=clang clang && \
conan profile update settings.compiler.version=14 clang && \
conan profile update settings.compiler.version=17 clang && \
conan profile update settings.compiler.libcxx=libc++ clang && \
conan profile update env.CC=/usr/local/opt/llvm/bin/clang clang && \
conan profile update env.CXX=/usr/local/opt/llvm/bin/clang++ clang
Expand Down
Loading