Skip to content

Commit f82d0ad

Browse files
itamarcpsJean-Lessajcarraror
authored
Development (#56)
* Revise and cleanup some stuff for #18 * Reflection interface for contracts * Revise Doxygen docs and code formatting everywhere * Go back to SemVer * Finish contract ABI generator * remove unnecessary headers * add uint128 support * add support for SafeUint128_t * ass support for SafeUint160_t * first adjust to reflect function with dynamic contract * Uncomment Patricia, fix Options SDKVersion * trying to deal with runtime inference * finish getData with any container * integrate register templates with DynamicContract class * finish dynamic contract reflection * fix formatting * Merge with v0.0.3 (#43) * add composer file to manager dockerfile * remove local repo * fix volume base sintax * change for loop on AIO for windows compatibility * add sudo to the mac docker usage instructions * fix bash identing * add unison for bidiretional syncing * remove my personal dir * fix volume path * add sync config file for unison * change docker docs and copy the local project to the docker local folder first * fix code formatting in readme * Bump version to release 0.0.3 --------- Co-authored-by: Julio Carraro <[email protected]> * Issue #30: Implement a JSON ABI Exporter using reflection (#38) * Reflection interface for contracts * Finish contract ABI generator * remove unnecessary headers * add composer file to manager dockerfile * remove local repo * fix volume base sintax * change for loop on AIO for windows compatibility * add sudo to the mac docker usage instructions * fix bash identing * change generator to generate to work for many contracts --------- Co-authored-by: Itamar Carvalho <[email protected]> * Fix compiler issues * add support for generating many json ABIs and deleting the deprecated registerCoreFunctions method * Update README.md * Fix typo on README.md * add tests pipeline to develop and add abigenerator tests * fix reflection interface maps * Refactor std::string to std::vector/array/span for storing bytes (#45) * 23 abi refactor (#35) (#36) * ABI: replace some string usage with string_view, deprecate JSONEncoder * Merge main to ABI (#34) * Replace LevelDB with RocksDB * Fix P2P deadlock over DiscoveryWorker * Stop sending invalid messages to Discovery nodes * Bump version to release 0.0.2 * Create c-cpp.yml * test pipeline * update pipeline * testing * add all deps * add cmake instead of make * run instead of uses * change distro to debian and generate doxygen * add tests and rollback to ubuntu (no support for pure debian) * Swap RocksDB with Speedb * Use merge on SafeUnorderedMap * Make Ninja compatible --------- * ABI: reject Hex usage, embrace raw bytes --------- Co-authored-by: Jean-Lessa <[email protected]> Co-authored-by: Julio Carraro <[email protected]> Co-authored-by: Julio Carraro <[email protected]> * Merge main into refactor-string (#41) * 23 abi refactor (#35) * ABI: replace some string usage with string_view, deprecate JSONEncoder * Merge main to ABI (#34) * Replace LevelDB with RocksDB * Fix P2P deadlock over DiscoveryWorker * Stop sending invalid messages to Discovery nodes * Bump version to release 0.0.2 * Create c-cpp.yml * test pipeline * update pipeline * testing * add all deps * add cmake instead of make * run instead of uses * change distro to debian and generate doxygen * add tests and rollback to ubuntu (no support for pure debian) * Swap RocksDB with Speedb * Use merge on SafeUnorderedMap * Make Ninja compatible --------- Co-authored-by: Jean-Lessa <[email protected]> Co-authored-by: Julio Carraro <[email protected]> Co-authored-by: Julio Carraro <[email protected]> * ABI: reject Hex usage, embrace raw bytes --------- Co-authored-by: Jean-Lessa <[email protected]> Co-authored-by: Julio Carraro <[email protected]> Co-authored-by: Julio Carraro <[email protected]> * add rocksdb package to the vm * uncomment network deploy * parametrize AIO-setup arguments * dockerize the project and add instructions for using docker * change the project folder name on docker * Fix merge usage over SafeUnorderedMap * make docker use local repo as volume instead of cloning a repo * add composer file to manager dockerfile * remove local repo * fix volume base sintax * change for loop on AIO for windows compatibility * add sudo to the mac docker usage instructions * fix bash identing * add unison for bidiretional syncing * remove my personal dir * fix volume path * add sync config file for unison --------- Co-authored-by: Jean-Lessa <[email protected]> Co-authored-by: Julio Carraro <[email protected]> Co-authored-by: Julio Carraro <[email protected]> * Full refactor of std::string to std::vector/array/span. * Fix compiling issues with the merge * fix main.cpp * Deprecate Blockchain::parseRPC() from the header * Update src/contract/abi.h Co-authored-by: Julio Carraro <[email protected]> * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Jean Francisco Lessa <[email protected]> * Apply suggestions from code review Co-authored-by: Jean Francisco Lessa <[email protected]> * Apply suggestions from code review Co-authored-by: Jean Francisco Lessa <[email protected]> * fix erc20 tests * install newer gcc for future C++23 support * Improve comments and indentation * Utils: fix unspecified comment block --------- Co-authored-by: Jean-Lessa <[email protected]> Co-authored-by: Julio Carraro <[email protected]> Co-authored-by: Julio Carraro <[email protected]> * update gcc using apt get * update synlinks to CI VM use gcc-12 instead of 11 * uint8 mapping was removed in some merge conflit, adding it back * put typemapping to abi types in abi namespace * implement manager interface as a standalone class * boilerplate for create and validate contract * add casting logic to createNewContract * finish cm refl * fix doxygen warnings * Apply suggestions from code review Co-authored-by: Jean Francisco Lessa <[email protected]> * remove refl header from dynamiccontract header and ass debian container for pipeline * remove sudo * add noninteractive behaviour for apt * add git in pipeline packages * get ethash log * fix identing :( * add ca-certificates * add protobuf-dev * Fix formatting in contractmanager.h * add code formatter using clang * supress rdpos test * supress state tests * Suppress p2p tests * install doxygen on pipeline * Add tests for Hex::toInt() and Hex::forRPC() * Remove rogue Hex::toInt() test in utils.cpp * Utils: fix docs/add tests for appendBytes()/bytesToString()/stringToBytes() * Add tests for Hex::isValid() * #50 Implement robust return types for contract functions (#51) * register payable/public function with any return type * generate ContractManager ABI: * generate manager abi when generating customcontracts abis * create JsonAbi namespace for dealing with json abi files * debugging actions fs * debugging pipeline fs * simplify calls to another contract view funcs * debugging test json * debugging ERC20 and states * calling non view functions without encoding * trying to fix abi json tests * trying to fiz json abi tests * enable compiler errors if ununsed vars * calling createContract from dynamic contract * im getting insane. * return types for vew functions * remove pipeline debug * Update src/utils/jsonabi.h Co-authored-by: Jean Francisco Lessa <[email protected]> * ad todo in RegisterHelper template * create BytesEncoded typedef * trying to fix json permission in pipeline --------- Co-authored-by: Jean Francisco Lessa <[email protected]> * mounting volume on pipeline for file issues * add pr template * fix some contracts characteristics * support for c++23 * register tuple of functions in the CM ABI generator * using github workspace path for abi tests * change abi generator tests to be static * supress p2p tests * add doxygen on pipeline * Refactor P2P (#54) * Refactor P2P * add missing doxygen docs and run all tests * add more sleep time for sleepy systems * Fix ManagerBase::answerSession shared_ptr segfault condition. * Remove #ifndef __MINGW32__ and add error handling conditions on ServerListener * Fix typo on Utils::logToDebug --------- Co-authored-by: jcarraror <[email protected]> * Fix ContractManager bug to ensure variable reversion upon exception (#55) * Move updateState() responsibility to ContractManager * Make ContractManager::contracts reversible * Update src/contract/contractmanager.h Co-authored-by: Jean Francisco Lessa <[email protected]> * Update Doxygen --------- Co-authored-by: Jean Francisco Lessa <[email protected]> * register constructor with shared_ptr policy * Bump version to release 0.1.0 * update version on cmakelists * separate pipeline workflow in jobs * install cmake on build job * install needed dependencies for build job * add more deps * apt update on build * add permition to test binary * install dependencies for test job --------- Co-authored-by: Jean-Lessa <[email protected]> Co-authored-by: Julio Carraro <[email protected]> Co-authored-by: Julio Carraro <[email protected]>
1 parent caf3842 commit f82d0ad

File tree

151 files changed

+28138
-15281
lines changed

Some content is hidden

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

151 files changed

+28138
-15281
lines changed
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
## What type of PR is this? (check all applicable)
2+
3+
- [ ] 🍕 Feature
4+
- [ ] 🐛 Bug Fix
5+
- [ ] 📝 Documentation Update
6+
- [ ] 🎨 Style
7+
- [ ] 🧑‍💻 Code Refactor
8+
- [ ] 🔥 Performance Improvements
9+
- [ ] ✅ Test
10+
- [ ] 🤖 Build
11+
- [ ] 🔁 CI
12+
- [ ] 📦 Chore (Release)
13+
- [ ] ⏩ Revert
14+
15+
## Description
16+
17+
<!--
18+
Please do not leave this blank
19+
This PR [adds/removes/fixes/replaces] the [feature/bug/etc] discussed in #issue-number
20+
-->
21+
22+
## Related Tickets & Documents
23+
<!--
24+
Please use this format link issue numbers: Fixes #123
25+
https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
26+
-->
27+
28+
## Screenshots/Recordings
29+
30+
<!-- Some changes are easier to understand with a visual. Please add screenshots or recordings here if applicable -->
31+
32+
33+
## Added tests?
34+
35+
- [ ] 👍 yes, i added new tests
36+
- [ ] 👍 yes, just refactored existing tests
37+
- [ ] 🙅 no, because they aren't needed
38+
- [ ] 🙋 no, because I need help
39+
40+
## Added to documentation?
41+
42+
- [ ] 📜 README.md
43+
- [ ] 📓 [Sparq Docs](https://github.com/SparqNet/sparq-docs)
44+
- [ ] 🙅 no documentation needed
45+
46+
## [optional] Are there any post-deployment tasks we need to perform?
47+
48+
<!-- note: PRs with deleted sections will be marked invalid -->

.github/workflows/c-cpp.yml

+80-6
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,108 @@ on:
44
push:
55
branches:
66
- main
7+
- development
78
pull_request:
89
branches:
910
- main
11+
- development
1012

1113
jobs:
12-
build:
14+
setup:
1315
runs-on: ubuntu-latest
1416

17+
container:
18+
image: debian:bookworm
19+
1520
steps:
1621
- name: Checkout repository
1722
uses: actions/checkout@v2
1823

19-
- name: Install CMake
20-
run: sudo apt-get update && sudo apt-get install -y cmake
24+
- name: Update apt-get
25+
run: apt-get update
2126

2227
- name: Install project dependencies
23-
run: sudo apt install build-essential cmake tmux clang-tidy autoconf libtool pkg-config libabsl-dev libboost-all-dev libc-ares-dev libcrypto++-dev libgrpc-dev libgrpc++-dev librocksdb-dev libscrypt-dev libsnappy-dev libssl-dev zlib1g-dev openssl protobuf-compiler protobuf-compiler-grpc
28+
run: DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake tmux clang-tidy autoconf libtool pkg-config libabsl-dev libboost-all-dev libc-ares-dev libcrypto++-dev libgrpc-dev libgrpc++-dev librocksdb-dev libscrypt-dev libsnappy-dev libssl-dev zlib1g-dev openssl protobuf-compiler protobuf-compiler-grpc libprotobuf-dev git doxygen
29+
30+
- name: Print GCC version
31+
run: gcc --version
2432

33+
- name: Install CA certificates
34+
run: apt-get install -y ca-certificates
35+
36+
build:
37+
needs: setup
38+
runs-on: ubuntu-latest
39+
40+
container:
41+
image: debian:bookworm
42+
43+
steps:
44+
- name: Checkout repository
45+
uses: actions/checkout@v2
46+
47+
- name: Update apt-get
48+
run: apt-get update
49+
50+
- name: Install project dependencies
51+
run: DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake tmux clang-tidy autoconf libtool pkg-config libabsl-dev libboost-all-dev libc-ares-dev libcrypto++-dev libgrpc-dev libgrpc++-dev librocksdb-dev libscrypt-dev libsnappy-dev libssl-dev zlib1g-dev openssl protobuf-compiler protobuf-compiler-grpc libprotobuf-dev git
52+
2553
- name: Configure CMake
2654
run: cmake -S . -B build
2755

2856
- name: Build with CMake
29-
run: cmake --build build
57+
run: cmake --build build || cat build/deps/src/ethash-stamp/ethash-configure-*.log
58+
59+
- name: Upload build artifacts
60+
uses: actions/upload-artifact@v2
61+
with:
62+
name: build
63+
path: build
64+
65+
test:
66+
needs: build
67+
runs-on: ubuntu-latest
68+
69+
container:
70+
image: debian:bookworm
71+
72+
steps:
73+
- name: Checkout repository
74+
uses: actions/checkout@v2
75+
76+
- name: Download build artifacts
77+
uses: actions/download-artifact@v2
78+
with:
79+
name: build
80+
path: build
81+
82+
- name: Install project dependencies
83+
run: DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential cmake tmux clang-tidy autoconf libtool pkg-config libabsl-dev libboost-all-dev libc-ares-dev libcrypto++-dev libgrpc-dev libgrpc++-dev librocksdb-dev libscrypt-dev libsnappy-dev libssl-dev zlib1g-dev openssl protobuf-compiler protobuf-compiler-grpc libprotobuf-dev git
84+
85+
- name: Give execute permissions
86+
run: chmod +x ./build/orbitersdkd-tests
3087

3188
- name: Run Catch2 Tests
3289
working-directory: build
3390
run: ./orbitersdkd-tests -d yes
34-
91+
92+
documentation:
93+
needs: test
94+
runs-on: ubuntu-latest
95+
96+
container:
97+
image: debian:bookworm
98+
99+
steps:
100+
- name: Checkout repository
101+
uses: actions/checkout@v2
102+
103+
- name: Download build artifacts
104+
uses: actions/download-artifact@v2
105+
with:
106+
name: build
107+
path: build
108+
35109
- name: Generate Doxygen Documentation
36110
run: |
37111
mkdir docs

.gitignore

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
ABI/
12
build/
3+
debug.txt
4+
log.txt
25
*.o
36
*.gch
47
.vs
@@ -20,7 +23,10 @@ scripts/AIO-setup.log
2023
compile_commands.json
2124
.cache/
2225

23-
#IDEA's IDE
26+
# Supra has a lot of patches in root
27+
*.patch
28+
29+
# IDEA's IDE
2430
.idea/
2531
cmake-build-debug/
2632
cmake-build-release/

CMakeLists.txt

+47-27
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@ cable_set_build_type(DEFAULT Debug CONFIGURATION_TYPES Debug;Release;RelWithDebI
1111
set(CMAKE_MAP_IMPORTED_CONFIG_Debug Debug)
1212
set(CMAKE_MAP_IMPORTED_CONFIG_RelWithDebInfo Debug)
1313

14-
# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:
14+
# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24+
1515
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
1616
cmake_policy(SET CMP0135 NEW)
1717
endif()
1818

1919
# Project data
20-
project(orbitersdk VERSION 3 DESCRIPTION "Sparq subnet")
21-
set(CMAKE_CXX_STANDARD 20)
20+
project(orbitersdk VERSION 0.1.0 DESCRIPTION "Sparq subnet")
21+
set(CMAKE_CXX_STANDARD 23)
2222
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
2323
set(CMAKE_CXX_EXTENSIONS OFF)
2424
SET(DEBUG ON CACHE BOOL "Debug mode")
2525
if(DEBUG)
26-
set(CMAKE_CXX_FLAGS "-O0 -g -fsanitize=address -fno-inline -fno-eliminate-unused-debug-types -fstack-protector") # Provides faster compile time.
26+
set(CMAKE_CXX_FLAGS "-O0 -g -fsanitize=address -fno-inline -fno-eliminate-unused-debug-types -fstack-protector -Werror=unused-variable") # Provides faster compile time.
2727
else()
28-
set(CMAKE_CXX_FLAGS "-O2")
28+
set(CMAKE_CXX_FLAGS "-O2 -Werror=unused-variable")
2929
endif()
3030
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
31-
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") # "ZLIB_USE_STATIC_LIBS" was added in 3.24
31+
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") # Always look for static libraries - "ZLIB_USE_STATIC_LIBS" was added in 3.24
3232
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # For clang-tidy
3333

3434
# Set project version inside the code
@@ -40,22 +40,26 @@ configure_file(
4040

4141
# External project data
4242
set(BUILD_TESTS ON CACHE BOOL "Build helper unit testing program")
43-
set(BUILD_DISCOVERY ON CACHE BOOL "Build helper discovery node prorgam")
43+
set(BUILD_DISCOVERY ON CACHE BOOL "Build helper discovery node program")
4444
set(BUILD_AVALANCHEGO OFF CACHE BOOL "Build with AvalancheGo wrapping")
4545
set(BUILD_TOOLS OFF CACHE BOOL "Build tools related to subnet")
4646
set(USE_LINT OFF CACHE BOOL "Run linter on compile (clang-tidy)")
4747
if(USE_LINT)
4848
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-header-filter=.;-checks=-*,abseil-*,boost-*,bugprone-*,cert-*,clang-analyzer-*,concurrency-*,cppcoreguidelines-*,hicpp-*,misc-*,modernize-*,performance-*,portability-*,readability-*")
4949
endif()
50-
message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
51-
message(STATUS "C++ Standard is required: ${CMAKE_CXX_STANDARD_REQUIRED}")
50+
51+
# Echo CMake vars during config
52+
message(STATUS "C++ standard: ${CMAKE_CXX_STANDARD}")
53+
message(STATUS "C++ standard is required: ${CMAKE_CXX_STANDARD_REQUIRED}")
5254
message(STATUS "C++ extensions: ${CMAKE_CXX_EXTENSIONS}")
53-
message(STATUS "C++ Flags: ${CMAKE_CXX_FLAGS}")
55+
message(STATUS "C++ flags: ${CMAKE_CXX_FLAGS}")
5456
message(STATUS "Using PIC: ${CMAKE_POSITION_INDEPENDENT_CODE}")
5557
message(STATUS "Find libs with suffix: ${CMAKE_FIND_LIBRARY_SUFFIXES}")
5658
message("Building tests: ${BUILD_TESTS}")
57-
message("Building avalanchego: ${BUILD_AVALANCHEGO}")
58-
message("Building discovery Node: ${BUILD_DISCOVERY}")
59+
message("Building Discovery Node: ${BUILD_DISCOVERY}")
60+
message("Building AvalancheGo support: ${BUILD_AVALANCHEGO}")
61+
message("Building tools: ${BUILD_TOOLS}")
62+
message("Using lint: ${USE_LINT}")
5963

6064
cable_add_buildinfo_library(PROJECT_NAME orbitersdk)
6165

@@ -80,26 +84,25 @@ include(cmake/ProjectEthash.cmake) # Ethash
8084
include(cmake/ProjectSecp256k1.cmake) # Bitcoin core fast implementation
8185
include(cmake/ProjectSpeedb.cmake) # Speedb (Level/RocksDB drop-in replacement)
8286

83-
# Build catch2 to a library.
87+
# Add catch2 as a library
8488
add_library(catch2
8589
${CMAKE_SOURCE_DIR}/src/libs/catch2/catch_amalgamated.hpp
8690
${CMAKE_SOURCE_DIR}/src/libs/catch2/catch_amalgamated.cpp
8791
)
88-
8992
target_include_directories(catch2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/catch2)
9093

9194
# Check compiler variable sizes
9295
include(cmake/CheckSizes.cmake)
9396

97+
# Add AvalancheGo wrapper dependencies if compiling it
9498
if(BUILD_AVALANCHEGO)
95-
# Add avalanchego wrapper dependencies.
9699
find_package(Absl REQUIRED) # Built-in is hardcoded to SHARED, this one to STATIC
97100
find_package(Cares REQUIRED)
98101
find_package(Protobuf 3.12 REQUIRED)
99102
find_package(GRPC REQUIRED)
100103
endif()
101104

102-
# Include headers and libs
105+
# Include directories for headers and libs
103106
include_directories(
104107
"${CMAKE_SOURCE_DIR}"
105108
"${CMAKE_SOURCE_DIR}/src"
@@ -123,10 +126,9 @@ add_subdirectory(src/net)
123126
add_subdirectory(src/utils)
124127
add_subdirectory(tests)
125128

129+
# Generate gRPC files if building with support for AvalancheGo.
130+
# Headers/sources are always cleaned at configure so they can be regenerated at build
126131
if(BUILD_AVALANCHEGO)
127-
# Generate gRPC files
128-
# Headers/sources are always cleaned at configure stage
129-
# so they can be regenerated at build stage
130132
file(REMOVE
131133
"${CMAKE_SOURCE_DIR}/proto/vm.grpc.pb.cc"
132134
"${CMAKE_SOURCE_DIR}/proto/aliasreader.grpc.pb.cc"
@@ -382,7 +384,7 @@ if(BUILD_AVALANCHEGO)
382384
target_link_libraries(orbitersdk_lib PRIVATE
383385
${CRYPTOPP_LIBRARIES} ${SCRYPT_LIBRARY} Secp256k1 Ethash ${ETHASH_BYPRODUCTS} ${Protobuf_LIBRARIES}
384386
${GRPC_LIBRARIES} ${CARES_LIBRARY} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} absl::flags
385-
Speedb ${SNAPPY_LIBRARY} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES}
387+
Speedb ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES}
386388
)
387389

388390
set_target_properties(orbitersdk_lib PROPERTIES COMPILE_FLAGS "-DAVALANCHEGO_COMPATIBLE=1")
@@ -395,10 +397,19 @@ if(BUILD_AVALANCHEGO)
395397
target_link_libraries(orbitersdkd
396398
orbitersdk_lib
397399
${Protobuf_LIBRARIES} ${GRPC_LIBRARIES} ${CARES_LIBRARY} Speedb
398-
${SNAPPY_LIBRARY} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES}
400+
${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES}
399401
absl::flags Secp256k1 Ethash ${ETHASH_BYPRODUCTS}
400402
)
401403

404+
# Compile and link the ABI generator executable
405+
add_executable(contractabigenerator "${CMAKE_SOURCE_DIR}/src/main-contract-abi.cpp")
406+
407+
add_dependencies(contractabigenerator orbitersdk_lib)
408+
target_include_directories(contractabigenerator PRIVATE orbitersdk_lib ${OPENSSL_INCLUDE_DIR})
409+
target_link_libraries(contractabigenerator
410+
orbitersdk_lib Speedb ${SNAPPY_LIBRARY} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} Secp256k1 Ethash ${ETHASH_BYPRODUCTS}
411+
)
412+
402413
# TODO: Implement tests for AvalancheGo compilation.
403414
else()
404415
add_library(orbitersdk_lib STATIC
@@ -416,7 +427,7 @@ else()
416427

417428
target_link_libraries(orbitersdk_lib PRIVATE
418429
${CRYPTOPP_LIBRARIES} ${SCRYPT_LIBRARY} Secp256k1 Ethash ${ETHASH_BYPRODUCTS}
419-
Speedb ${SNAPPY_LIBRARY} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES}
430+
Speedb ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES}
420431
)
421432

422433
set_target_properties(orbitersdk_lib PROPERTIES COMPILE_FLAGS "-DAVALANCHEGO_COMPATIBLE=0")
@@ -427,6 +438,15 @@ else()
427438
add_dependencies(orbitersdkd orbitersdk_lib)
428439
target_include_directories(orbitersdkd PRIVATE orbitersdk_lib ${OPENSSL_INCLUDE_DIR})
429440
target_link_libraries(orbitersdkd
441+
orbitersdk_lib Speedb ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} Secp256k1 Ethash ${ETHASH_BYPRODUCTS}
442+
)
443+
444+
# Compile and link the ABI generator executable
445+
add_executable(contractabigenerator "${CMAKE_SOURCE_DIR}/src/main-contract-abi.cpp")
446+
447+
add_dependencies(contractabigenerator orbitersdk_lib)
448+
target_include_directories(contractabigenerator PRIVATE orbitersdk_lib ${OPENSSL_INCLUDE_DIR})
449+
target_link_libraries(contractabigenerator
430450
orbitersdk_lib Speedb ${SNAPPY_LIBRARY} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} Secp256k1 Ethash ${ETHASH_BYPRODUCTS}
431451
)
432452

@@ -440,23 +460,23 @@ else()
440460
)
441461
endif()
442462

443-
# Compile and link the test executable
463+
# Compile and link the test executable if set to build it
444464
if (BUILD_TESTS)
445465
add_executable(orbitersdkd-tests ${TESTS_HEADERS} ${TESTS_SOURCES})
446466
add_dependencies(orbitersdkd-tests orbitersdk_lib)
447467
target_include_directories(orbitersdkd-tests PRIVATE orbitersdk_lib ${OPENSSL_INCLUDE_DIR})
448468
target_link_libraries(orbitersdkd-tests
449-
orbitersdk_lib Speedb ${SNAPPY_LIBRARY} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} Secp256k1 catch2 Ethash ${ETHASH_BYPRODUCTS}
450-
)
469+
orbitersdk_lib Speedb ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} Secp256k1 catch2 Ethash ${ETHASH_BYPRODUCTS}
470+
)
451471
endif()
452472

453-
# Compile and link the Discovery Node test executable
473+
# Compile and link the Discovery Node test executable if set to build it
454474
if (BUILD_DISCOVERY)
455475
add_executable(orbitersdkd-discovery "${CMAKE_SOURCE_DIR}/src/main-discovery.cpp")
456476
add_dependencies(orbitersdkd-discovery orbitersdk_lib)
457477
target_include_directories(orbitersdkd-discovery PRIVATE orbitersdk_lib ${OPENSSL_INCLUDE_DIR})
458478
target_link_libraries(orbitersdkd-discovery
459-
orbitersdk_lib Speedb ${SNAPPY_LIBRARY} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} Secp256k1 Ethash ${ETHASH_BYPRODUCTS}
479+
orbitersdk_lib Speedb ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} Secp256k1 Ethash ${ETHASH_BYPRODUCTS}
460480
)
461481
endif()
462482

Doxyfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ WARN_NO_PARAMDOC = NO
864864
# Possible values are: NO, YES and FAIL_ON_WARNINGS.
865865
# The default value is: NO.
866866

867-
WARN_AS_ERROR = NO
867+
WARN_AS_ERROR = FAIL_ON_WARNINGS
868868

869869
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
870870
# can produce. The string should contain the $file, $line, and $text tags, which
@@ -995,7 +995,7 @@ RECURSIVE = YES
995995
# Note that relative paths are relative to the directory from which doxygen is
996996
# run.
997997

998-
EXCLUDE = "src/libs" "src/utils/json.hpp"
998+
EXCLUDE = "src/libs" "src/utils/json.hpp" "src/utils/meta_all.hpp"
999999

10001000
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
10011001
# directories that are symbolic links (a Unix file system feature) are excluded

0 commit comments

Comments
 (0)