Skip to content

Commit 72dfc18

Browse files
j-bermanjeffro256kayabaNervevtnerdSyntheticBird45
committed
FCMP++/Carrot mega commit [5/28/26]
Co-authored-by: jeffro256 <jeffro256@tutanota.com> Co-authored-by: Luke Parker <lukeparker5132@gmail.com> Co-authored-by: Lee *!* Clagett <code@leeclagett.com> Co-authored-by: SyntheticBird45 <someoneelse.is_on.github.rio7x@simplelogin.com> Co-authored-by: jeetrex17 <jeetrex@tutamail.com> Co-authored-by: UkoeHB <ukoehb@users.noreply.github.com>
1 parent e106b5e commit 72dfc18

270 files changed

Lines changed: 51412 additions & 2899 deletions

File tree

Some content is hidden

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

.gitmodules

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@
1111
[submodule "external/gtest"]
1212
path = external/gtest
1313
url = https://github.com/google/googletest.git
14+
[submodule "external/fcmp-plus-plus"]
15+
path = external/fcmp-plus-plus
16+
url = https://github.com/kayabaNerve/fcmp-plus-plus.git
17+
[submodule "external/mx25519"]
18+
path = external/mx25519
19+
url = https://github.com/jeffro256/mx25519
20+
branch = unclamped

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ if(NOT MANUAL_SUBMODULES)
388388
check_submodule(external/rapidjson)
389389
check_submodule(external/randomx)
390390
check_submodule(external/supercop)
391+
check_submodule(external/mx25519)
391392
endif()
392393
endif()
393394

@@ -459,7 +460,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
459460
set(BSDI TRUE)
460461
endif()
461462

462-
include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include)
463+
include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include external/mx25519/include)
463464

464465
if(MINGW)
465466
set(DEFAULT_STATIC true)
@@ -486,6 +487,7 @@ set(PIC_FLAG "-fPIC")
486487
if(STATIC)
487488
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
488489
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DZMQ_STATIC")
490+
add_definitions("-DMX25519_STATIC")
489491
endif()
490492

491493
option(SANITIZE "Use ASAN memory sanitizer" OFF)
@@ -969,6 +971,9 @@ endif()
969971
add_definitions(-DBOOST_ASIO_ENABLE_SEQUENTIAL_STRAND_ALLOCATION)
970972
add_definitions(-DBOOST_NO_AUTO_PTR)
971973
add_definitions(-DBOOST_UUID_DISABLE_ALIGNMENT) # This restores UUID's std::has_unique_object_representations property
974+
# Boost has two conflicting save/load impls for `std::variant`, one in serialization/variant.hpp,
975+
# and one in serialization/std_variant.hpp. This macro disables the one in variant.hpp.
976+
add_definitions(-DBOOST_NO_CXX17_HDR_VARIANT)
972977

973978
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
974979
if(MINGW)

contrib/epee/include/serialization/keyvalue_serialization.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ public: \
8787
template<typename T> inline void serialize_default(const T &t, T v) { }
8888
template<typename T> inline void serialize_default(T &t, T v) { t = v; }
8989

90-
#define KV_SERIALIZE_OPT_N(variable, val_name, default_value) \
90+
#define KV_SERIALIZE_OPT_N(variable, val_name, default_value, exclude_default_on_write) \
9191
do { \
92-
if (is_store && this_ref.variable == default_value) \
92+
if (is_store && this_ref.variable == default_value && exclude_default_on_write) \
9393
break; \
9494
if (!epee::serialization::selector<is_store>::serialize(this_ref.variable, stg, hparent_section, val_name)) \
9595
epee::serialize_default(this_ref.variable, default_value); \
@@ -122,7 +122,8 @@ public: \
122122
#define KV_SERIALIZE_VAL_POD_AS_BLOB_OPT(varialble, def) KV_SERIALIZE_VAL_POD_AS_BLOB_OPT_N(varialble, #varialble, def)
123123
#define KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE(varialble) KV_SERIALIZE_VAL_POD_AS_BLOB_FORCE_N(varialble, #varialble) //skip is_trivially_copyable and is_standard_layout compile time check
124124
#define KV_SERIALIZE_CONTAINER_POD_AS_BLOB(varialble) KV_SERIALIZE_CONTAINER_POD_AS_BLOB_N(varialble, #varialble)
125-
#define KV_SERIALIZE_OPT(variable,default_value) KV_SERIALIZE_OPT_N(variable, #variable, default_value)
125+
#define KV_SERIALIZE_OPT(variable,default_value) KV_SERIALIZE_OPT_N(variable, #variable, default_value, true)
126+
#define KV_SERIALIZE_INCLUDE_OPT(variable,default_value) KV_SERIALIZE_OPT_N(variable, #variable, default_value, false)
126127

127128
}
128129

contrib/epee/include/serialization/wire/traits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#pragma once
2929

30-
#include <cstdint>
30+
#include <cstddef>
3131
#include <type_traits>
3232

3333
#define WIRE_DECLARE_BLOB_NS(type) \

external/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ add_subdirectory(db_drivers)
3232
add_subdirectory(easylogging++)
3333
add_subdirectory(qrcodegen)
3434
add_subdirectory(randomx EXCLUDE_FROM_ALL)
35+
add_subdirectory(mx25519)

external/mx25519

Submodule mx25519 added at e808a64

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,15 @@ endfunction ()
8181
include(Version)
8282
monero_add_library(version SOURCES ${CMAKE_BINARY_DIR}/version.cpp DEPENDS genversion)
8383

84+
add_subdirectory(carrot_core)
85+
add_subdirectory(carrot_impl)
8486
add_subdirectory(common)
8587
add_subdirectory(crypto)
8688
add_subdirectory(ringct)
8789
add_subdirectory(checkpoints)
8890
add_subdirectory(cryptonote_basic)
8991
add_subdirectory(cryptonote_core)
92+
add_subdirectory(fcmp_pp)
9093
add_subdirectory(lmdb)
9194
add_subdirectory(multisig)
9295
add_subdirectory(net)

src/blockchain_db/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ target_link_libraries(blockchain_db
4646
common
4747
cncrypto
4848
cryptonote_basic
49+
fcmp_pp
4950
ringct_basic
5051
${LMDB_LIBRARY}
5152
${Boost_FILESYSTEM_LIBRARY}

0 commit comments

Comments
 (0)