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

chore: update to latest dependecies #2859

Merged
merged 5 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 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
kstdl marked this conversation as resolved.
Show resolved Hide resolved
# 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
12 changes: 6 additions & 6 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +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("gtest/1.15.0")
self.requires("lz4/1.10.0")
self.requires("rocksdb/9.2.1")
self.requires("prometheus-cpp/1.1.0")
self.requires("prometheus-cpp/1.2.4")
self.requires("jsoncpp/1.9.5")

def _configure_boost_libs(self):
Expand Down
33 changes: 0 additions & 33 deletions libraries/aleth/libdevcore/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,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 @@ -164,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
2 changes: 1 addition & 1 deletion libraries/config/include/config/config_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ std::string getConfigErr(const std::vector<std::string> &path);
Json::Value getConfigData(Json::Value root, const std::vector<std::string> &path, bool optional = false);

std::string getConfigDataAsString(const Json::Value &root, const std::vector<std::string> &path, bool optional = false,
std::string value = {});
const std::string &value = {});

uint32_t getConfigDataAsUInt(const Json::Value &root, const std::vector<std::string> &path, bool optional = false,
uint32_t value = 0);
Expand Down
2 changes: 1 addition & 1 deletion libraries/config/src/config_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Json::Value getConfigData(Json::Value root, const std::vector<std::string> &path
}

std::string getConfigDataAsString(const Json::Value &root, const std::vector<std::string> &path, bool optional,
std::string value) {
const std::string &value) {
try {
Json::Value ret = getConfigData(root, path, optional);
if (ret.isNull()) {
Expand Down
11 changes: 5 additions & 6 deletions libraries/core_libs/consensus/src/dag/dag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ bool Dag::computeOrder(const blk_hash_t &anchor, std::vector<blk_hash_t> &ordere
dfs.push({cur.first, true});
std::vector<std::pair<blk_hash_t, vertex_t>> neighbors;
// iterate through neighbors
for (std::tie(adj_s, adj_e) = adjacenct_vertices(cur.first, graph_); adj_s != adj_e; adj_s++) {
for (std::tie(adj_s, adj_e) = boost::adjacent_vertices(cur.first, graph_); adj_s != adj_e; adj_s++) {
if (epfriend.find(index_map[*adj_s]) == epfriend.end()) { // not in this epoch
continue;
}
Expand Down Expand Up @@ -183,7 +183,7 @@ bool Dag::reachable(vertex_t const &from, vertex_t const &to) const {
vertex_t t = st.top();
st.pop();
vertex_adj_iter_t s, e;
for (std::tie(s, e) = adjacenct_vertices(t, graph_); s != e; ++s) {
for (std::tie(s, e) = boost::adjacent_vertices(t, graph_); s != e; ++s) {
if (visited.count(*s)) continue;
if (*s == target) return true;
visited.insert(*s);
Expand Down Expand Up @@ -221,7 +221,7 @@ std::vector<blk_hash_t> PivotTree::getGhostPath(const blk_hash_t &vertex) const
cur = st.top();
st.pop();
post_order.emplace_back(cur);
for (std::tie(s, e) = adjacenct_vertices(cur, graph_); s != e; s++) {
for (std::tie(s, e) = boost::adjacent_vertices(cur, graph_); s != e; s++) {
st.emplace(*s);
}
}
Expand All @@ -232,7 +232,7 @@ std::vector<blk_hash_t> PivotTree::getGhostPath(const blk_hash_t &vertex) const
for (auto const &n : post_order) {
auto total_w = 0;
// get childrens
for (std::tie(s, e) = adjacenct_vertices(n, graph_); s != e; s++) {
for (std::tie(s, e) = boost::adjacent_vertices(n, graph_); s != e; s++) {
if (weight_map.count(*s)) { // bigger timestamp
total_w += weight_map[*s];
}
Expand All @@ -248,7 +248,7 @@ std::vector<blk_hash_t> PivotTree::getGhostPath(const blk_hash_t &vertex) const
size_t heavist = 0;
vertex_t next = root;

for (std::tie(s, e) = adjacenct_vertices(root, graph_); s != e; s++) {
for (std::tie(s, e) = boost::adjacent_vertices(root, graph_); s != e; s++) {
if (!weight_map.count(*s)) continue; // bigger timestamp
size_t w = weight_map[*s];
assert(w > 0);
Expand All @@ -257,7 +257,6 @@ std::vector<blk_hash_t> PivotTree::getGhostPath(const blk_hash_t &vertex) const
next = *s;
} else if (w == heavist) {
if (index_map[*s] < index_map[next]) {
heavist = w;
next = *s;
}
}
Expand Down
3 changes: 2 additions & 1 deletion libraries/core_libs/consensus/src/dag/dag_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ uint DagManager::setDagBlockOrder(blk_hash_t const &new_anchor, PbftPeriod perio
} else {
db_->removeDagBlock(blk_hash);
seen_blocks_.erase(blk_hash);
for (const auto &trx : dag_block->getTrxs()) expired_dag_blocks_transactions.emplace_back(trx);
const auto dag_trxs = dag_block->getTrxs();
std::copy(dag_trxs.begin(), dag_trxs.end(), std::back_inserter(expired_dag_blocks_transactions));
}
}
}
Expand Down
Loading