Skip to content

Commit

Permalink
Merge pull request #2071 from skalenetwork/develop-copy
Browse files Browse the repository at this point in the history
develop
  • Loading branch information
DmytroNazarenko authored Jan 7, 2025
2 parents 585ab90 + 32b8b9d commit ee3f4b2
Show file tree
Hide file tree
Showing 32 changed files with 336 additions and 135 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
jobs:
functional-tests:
name: Functional tests for ${{ inputs.version }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
SKALED_RELEASE: ${{ inputs.version }}
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ jobs:
- name: install packages
run: |
sudo apt-get -y remove libzmq* || true
sudo apt-get -y install software-properties-common gcc-9 g++-9 || true
sudo apt-get -y install software-properties-common gcc-11 g++-11 || true
- name: Use g++-9 and gcov-9 by default
- name: Use g++-11 and gcov-11 by default
run: |
echo "Updating all needed alternatives"
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-9 9
sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-9 9
sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-9 9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-11 11
sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-11 11
sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-11 11
echo "Checking alternative for gcc"
which gcc
gcc --version
Expand Down Expand Up @@ -80,16 +80,16 @@ jobs:
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: Ccache cache files
uses: actions/cache@v1.1.0
uses: actions/cache@v4.2.0
with:
path: .ccache
key: ${ { matrix.config.name } }-ccache-${ { steps.ccache_cache_timestamp.outputs.timestamp } }
restore-keys: |
${ { matrix.config.name } }-ccache-
- name: Build dependencies
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=RelWithDebInfo
cd deps
Expand All @@ -99,8 +99,8 @@ jobs:
cd ..
- name: Configure all
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=RelWithDebInfo
mkdir -p build
Expand All @@ -110,8 +110,8 @@ jobs:
cd ..
- name: Build all
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=RelWithDebInfo
cd build
Expand All @@ -122,8 +122,8 @@ jobs:
cd ..
- name: Configure historic state build
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=RelWithDebInfo
mkdir -p build-historic
Expand All @@ -133,8 +133,8 @@ jobs:
cd ..
- name: Build historic state version
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=RelWithDebInfo
cd build-historic
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/setup-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ jobs:
- name: install packages
run: |
sudo apt-get -y remove libzmq* || true
sudo apt-get -y install software-properties-common gcc-9 g++-9 || true
sudo apt-get -y install software-properties-common gcc-11 g++-11 || true
- name: Use g++-9 and gcov-9 by default
- name: Use g++-11 and gcov-11 by default
run: |
echo "Updating all needed alternatives"
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-9 9
sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-9 9
sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-9 9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-11 11
sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-11 11
sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-11 11
echo "Checking alternative for gcc"
which gcc
gcc --version
Expand Down Expand Up @@ -112,16 +112,16 @@ jobs:
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: Ccache cache files
uses: actions/cache@v1.1.0
uses: actions/cache@v4.2.0
with:
path: .ccache
key: ${ { matrix.config.name } }-ccache-${ { steps.ccache_cache_timestamp.outputs.timestamp } }
restore-keys: |
${ { matrix.config.name } }-ccache-
- name: Build dependencies
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=$BUILD_TYPE
[[ $CMAKE_BUILD_TYPE = "Debug" ]] && export DEBUG_FLAG=1 || export DEBUG_FLAG=0
Expand All @@ -134,8 +134,8 @@ jobs:
env:
CMAKE_OPTS: ${{ env.CMAKE_OPTS }}
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=$BUILD_TYPE
mkdir -p build
Expand All @@ -144,8 +144,8 @@ jobs:
cd ..
- name: Build all
run: |
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=$BUILD_TYPE
cd build
Expand Down
48 changes: 24 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ jobs:
- name: install packages
run: |
sudo apt-get -y remove libzmq* || true
sudo apt-get -y install software-properties-common gcc-9 g++-9 || true
sudo apt-get -y install software-properties-common gcc-11 g++-11 || true
- name: Use g++-9 and gcov-9 by default
- name: Use g++-11 and gcov-11 by default
run: |
echo "Updating all needed alternatives"
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-9 9
sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-9 9
sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-9 9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-11 11
sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-11 11
sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-11 11
echo "Checking alternative for gcc"
which gcc
gcc --version
Expand Down Expand Up @@ -102,16 +102,16 @@ jobs:
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: Ccache cache files
uses: actions/cache@v1.1.0
uses: actions/cache@v4.2.0
with:
path: .ccache
key: ${ { matrix.config.name } }-ccache-${ { steps.ccache_cache_timestamp.outputs.timestamp } }
restore-keys: |
${ { matrix.config.name } }-ccache-
- name: Update gcc-9
- name: Update gcc-11
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
- name: Configure ccache cache size, zero ccache counters and print ccache stats before start
run: |
ccache --max-size=15G
Expand All @@ -120,8 +120,8 @@ jobs:
- name: Build dependencies
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
export CODE_COVERAGE=ON
Expand All @@ -134,8 +134,8 @@ jobs:
- name: Configure all
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
export CODE_COVERAGE=ON
Expand All @@ -150,8 +150,8 @@ jobs:
- name: Build all
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
export CODE_COVERAGE=ON
Expand Down Expand Up @@ -211,9 +211,9 @@ jobs:
run_test JsonRpcSuite
run_test SingleConsensusTests
run_test ConsensusTests
sudo ./testeth -t BtrfsTestSuite -- --all && touch /tmp/tests/BtrfsTestSuitePassed
sudo ./testeth -t HashSnapshotTestSuite -- --all && touch /tmp/tests/HashSnapshotTestSuitePassed
sudo ./testeth -t ClientSnapshotsSuite -- --all && touch /tmp/tests/ClientSnapshotsSuitePassed
sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t BtrfsTestSuite -- --all && touch /tmp/tests/BtrfsTestSuitePassed
sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t HashSnapshotTestSuite -- --all && touch /tmp/tests/HashSnapshotTestSuitePassed
sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t ClientSnapshotsSuite -- --all && touch /tmp/tests/ClientSnapshotsSuitePassed
cd ..
- name: Testeth verbosity 4
run : |
Expand Down Expand Up @@ -270,8 +270,8 @@ jobs:
- name: Configure all as historic
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
export CODE_COVERAGE=ON
Expand All @@ -283,8 +283,8 @@ jobs:
- name: Build all historic
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-9
export CXX=g++-9
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
export CODE_COVERAGE=ON
Expand Down
28 changes: 7 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ list( APPEND CMAKE_MODULE_PATH ${ETH_CMAKE_DIR} )
set( CMAKE_MAP_IMPORTED_CONFIG_DEBUG Release )
set( CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release )

set( HUNTER_CONFIGURATION_TYPES Release )
set( HUNTER_JOBS_NUMBER 4 )

find_program( CCACHE_FOUND ccache )
if( CCACHE_FOUND )
set_property( GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache )
Expand All @@ -93,11 +90,6 @@ if( "$ENV{CI}" AND NOT "$ENV{GITHUB_USER_PASSWORD}" STREQUAL "" )
else()
set( run_upload NO )
endif()
option( HUNTER_RUN_UPLOAD "Upload binaries to the cache server" ${run_upload} )

include( HunterGate )
#HunterGate( URL "https://github.com/ruslo/hunter/archive/v0.23.76.tar.gz" SHA1 "c7b60993e841850e2c449afd454f5d5aa4ec04e4" LOCAL )
HunterGate( URL "https://github.com/ruslo/hunter/archive/v0.23.214.tar.gz" SHA1 "e14bc153a7f16d6a5eeec845fb0283c8fad8c358" LOCAL ) #leveldb 1.22

set( CMAKE_CXX_STANDARD 17 )

Expand Down Expand Up @@ -135,36 +127,28 @@ include( FindClangFormat )

set( Boost_USE_STATIC_LIBS ON )
set( Boost_USE_MULTITHREADED ON )
hunter_add_package( Boost COMPONENTS program_options filesystem system thread context fiber log chrono test)
find_package( Boost CONFIG REQUIRED program_options filesystem system thread context fiber log chrono)

set( SKALE_HAVE_BOOST_FROM_HUNTER true )
set( Boost_NO_BOOST_CMAKE ON )
find_package( Boost MODULE REQUIRED program_options filesystem system thread context fiber log chrono)

option( BUILD_LEVELDB "Build leveldb from leveldb directory" OFF )

if( BUILD_LEVELDB )
add_subdirectory( leveldb )
else()
hunter_add_package( leveldb )
find_package( leveldb CONFIG REQUIRED )
endif()

#hunter_add_package( jsoncpp )
#find_package( jsoncpp PATHS "${DEPS_INSTALL_ROOT}/libs/cmake" ) #( jsoncpp CONFIG REQUIRED )

hunter_add_package( Snappy )
find_package( Snappy CONFIG REQUIRED )
find_package( Crc32c CONFIG REQUIRED )

set( LIB_NAME_cryptopp "cryptopp" )

#set( MHD_DIR "${DEPS_INSTALL_ROOT}" )
#find_package( MHD PATHS "${DEPS_INSTALL_ROOT}/libs/cmake" )
#find_library( MHD microhttpd )

hunter_add_package( libscrypt )
find_package( libscrypt CONFIG REQUIRED )
find_library( SCRYPT_LIBRARIES NAMES scrypt HINTS "${DEPS_INSTALL_ROOT}/lib")

hunter_add_package( ethash )
find_package( ethash CONFIG REQUIRED )

include( ProjectSecp256k1 )
Expand All @@ -185,7 +169,6 @@ if( TESTS )
include( ProjectBinaryen )
endif()


if (HISTORIC_STATE)
add_definitions(-DHISTORIC_STATE=1)
endif (HISTORIC_STATE)
Expand Down Expand Up @@ -250,8 +233,11 @@ if ( CONSENSUS )
set( SKALED_LATEST_STANDARD ON CACHE BOOL "Use latest standards" ) # depricated option. TODO: remove from consensus
set( BUILD_TESTS OFF CACHE BOOL "Build tests" ) # do not build libbls tests
add_subdirectory( libconsensus EXCLUDE_FROM_ALL)
target_compile_options( consensus PRIVATE -Wno-unused-variable ) # silence libff warnings
target_compile_options( bls PRIVATE -Wno-unused-variable ) # silence libff warnings
else()
add_subdirectory( libconsensus/libBLS )
target_compile_options( bls PRIVATE -Wno-unused-variable ) # silence libff warnings
set( BUILD_TESTS OFF CACHE BOOL "Build tests" ) # do not build libbls tests
endif()

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0
4.0.0
5 changes: 0 additions & 5 deletions cmake/EthCompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ if( SKALED_HATE_WARNINGS )
add_compile_options( -Wno-error=non-virtual-dtor )
add_compile_options( -Werror -Wno-deprecated-declarations)
add_compile_options( -Wno-error=sign-compare )
#add_compile_options( -Wno-error=reorder )
#add_compile_options( -Wno-error=deprecated )
#add_compile_options( -Wno-error=unused-variable )
#add_compile_options( -Wno-error=unused-parameter )
#add_compile_options( -Wno-error=unused-but-set-variable )
add_compile_options(-Wno-error=int-in-bool-context)
add_compile_options(-Wno-error=address)
add_compile_options(-Wno-error=nonnull-compare)
Expand Down
Loading

0 comments on commit ee3f4b2

Please sign in to comment.