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 160 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 5)
# 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
11 changes: 5 additions & 6 deletions for_devs/local-net
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3

import click
import subprocess
import threading
Expand Down Expand Up @@ -313,7 +312,7 @@ def faucet_worker(tps):
time.sleep(10)
web3 = Web3(Web3.HTTPProvider('http://127.0.0.1:7017'))
nonce = web3.eth.get_transaction_count(
Web3.to_checksum_address(faucet_public_address))
Web3.toChecksumAddress(faucet_public_address))

consensus_nodes = list(consensus_nodes_public_addresses.keys())

Expand All @@ -323,10 +322,10 @@ def faucet_worker(tps):
0, len(consensus_nodes)-1)]]
tx = {
'nonce': nonce,
'to': Web3.to_checksum_address(to),
'value': web3.to_wei(100000000, 'gwei'),
'to': Web3.toChecksumAddress(to),
'value': web3.toWei(100000000, 'gwei'),
'gas': 21000,
'gasPrice': web3.to_wei(1, 'gwei'),
'gasPrice': web3.toWei(1, 'gwei'),
'chainId': int(chain_id)
}
nonce = nonce + 1
Expand All @@ -338,7 +337,7 @@ def faucet_worker(tps):
try:
tx_hash = web3.eth.send_raw_transaction(signed_tx.rawTransaction)
log_format(
'faucet', f'{t} Dripped to {to}, tx_hash: {web3.to_hex(tx_hash)}')
'faucet', f'{t} Dripped to {to}, tx_hash: {web3.toHex(tx_hash)}')
except Exception as e:
log_format('faucet', f'{t} Failed to drip to {to}. Error: {str(e)}')
pass
Expand Down
2 changes: 1 addition & 1 deletion libraries/aleth/libdevcore/Base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include <string>

#include "FixedHash.h"
#include "Common.h"

namespace dev {
std::string toBase64(bytesConstRef _in);
Expand Down
1 change: 0 additions & 1 deletion libraries/aleth/libdevcore/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "Common.h"

#include "Exceptions.h"
#include "Log.h"

#if defined(_WIN32)
Expand Down
34 changes: 0 additions & 34 deletions libraries/aleth/libdevcore/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#pragma warning(push)
#pragma GCC diagnostic push
Expand Down Expand Up @@ -128,33 +127,6 @@ using strings = std::vector<std::string>;
// Null/Invalid values for convenience.
extern bytes const NullBytes;

/// Interprets @a _u as a two's complement signed number and returns the
/// resulting s256.
inline s256 u2s(u256 _u) {
static const bigint c_end = bigint(1) << 256;
if (boost::multiprecision::bit_test(_u, 255))
return s256(-(c_end - _u));
else
return s256(_u);
}

/// @returns the two's complement signed representation of the signed number _u.
inline u256 s2u(s256 _u) {
static const bigint c_end = bigint(1) << 256;
if (_u >= 0)
return u256(_u);
else
return u256(c_end + _u);
}

/// @returns the smallest n >= 0 such that (1 << n) >= _x
inline unsigned int toLog2(u256 _x) {
unsigned ret;
for (ret = 0; _x >>= 1; ++ret) {
}
return ret;
}

template <size_t n>
inline u256 exp10() {
return exp10<n - 1>() * u256(10);
Expand All @@ -165,12 +137,6 @@ inline u256 exp10<0>() {
return u256(1);
}

/// @returns the absolute distance between _a and _b.
template <class N>
inline N diff(N const& _a, N const& _b) {
return std::max(_a, _b) - std::min(_a, _b);
}

/// RAII utility class whose destructor calls a given function.
class ScopeGuard {
public:
Expand Down
4 changes: 3 additions & 1 deletion libraries/aleth/libdevcore/CommonData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

#include "CommonData.h"

#include <random>
#include <libdevcore/Common.h>

#include <boost/throw_exception.hpp>

#include "Exceptions.h"

Expand Down
2 changes: 0 additions & 2 deletions libraries/aleth/libdevcore/CommonIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include <boost/filesystem.hpp>
#include <chrono>
#include <iosfwd>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <string>
Expand Down
1 change: 0 additions & 1 deletion libraries/aleth/libdevcore/CommonJS.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <string>

#include "CommonData.h"
#include "CommonIO.h"
#include "FixedHash.h"

namespace dev {
Expand Down
9 changes: 0 additions & 9 deletions libraries/aleth/libdevcore/Guards.cpp

This file was deleted.

1 change: 0 additions & 1 deletion libraries/aleth/libdevcore/Guards.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#pragma once

#include <atomic>
#include <condition_variable>
#include <mutex>
#pragma warning(push)
Expand Down
1 change: 0 additions & 1 deletion libraries/aleth/libdevcore/Log.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <string>
#include <vector>

#include "CommonIO.h"
#include "FixedHash.h"
#include "Terminal.h"

Expand Down
8 changes: 8 additions & 0 deletions libraries/aleth/libdevcore/RLP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
// Copyright 2013-2019 Aleth Authors.
// Licensed under the GNU General Public License, Version 3.
#include "RLP.h"

#include <libdevcore/Exceptions.h>
#include <libdevcore/vector_ref.h>

#include <boost/exception/detail/error_info_impl.hpp>
#include <boost/exception/info_tuple.hpp>
#include <sstream>

using namespace std;
using namespace dev;

Expand Down
2 changes: 0 additions & 2 deletions libraries/aleth/libdevcore/RLP.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#pragma once

#include <array>
#include <exception>
#include <iomanip>
#include <iosfwd>
#include <type_traits>
#include <vector>
Expand Down
2 changes: 2 additions & 0 deletions libraries/aleth/libdevcore/SHA3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include <ethash/keccak.hpp>

#include "ethash/hash_types.hpp"

namespace dev {

bool sha3(bytesConstRef _input, bytesRef o_output) noexcept {
Expand Down
2 changes: 1 addition & 1 deletion libraries/aleth/libdevcrypto/AES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#include <cryptopp/modes.h>
#include <cryptopp/pwdbased.h>
#include <cryptopp/sha.h>
#include <libdevcore/CommonData.h>

using namespace dev;
using namespace dev::crypto;

bytes dev::aesDecrypt(bytesConstRef _ivCipher, std::string const& _password, unsigned _rounds, bytesConstRef _salt) {
bytes pw = asBytes(_password);
Expand Down
2 changes: 1 addition & 1 deletion libraries/aleth/libdevcrypto/AES.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include "Common.h"
#include <libdevcore/Common.h>

namespace dev {

Expand Down
3 changes: 0 additions & 3 deletions libraries/aleth/libdevcrypto/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

#include <cryptopp/aes.h>
#include <cryptopp/modes.h>
#include <cryptopp/pwdbased.h>
#include <cryptopp/sha.h>
#include <libdevcore/Guards.h> // <boost/thread> conflicts with <thread>
#include <libdevcore/SHA3.h>
#include <secp256k1.h>
Expand All @@ -17,7 +15,6 @@

#include "AES.h"
#include "CryptoPP.h"
#include "Exceptions.h"
using namespace std;
using namespace dev;
using namespace dev::crypto;
Expand Down
2 changes: 0 additions & 2 deletions libraries/aleth/libdevcrypto/CryptoPP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
#include <cryptopp/eccrypto.h>
#include <cryptopp/oids.h>
#include <cryptopp/osrng.h>
#include <libdevcore/Assertions.h>
#include <libdevcore/Guards.h> // <boost/thread> conflicts with <thread>
#include <libdevcore/SHA3.h>

static_assert(CRYPTOPP_VERSION >= 565, "Wrong Crypto++ version");

Expand Down
6 changes: 0 additions & 6 deletions libraries/aleth/libp2p/All.h

This file was deleted.

Loading