Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
92a8c35
add key exchange round booster to multisig_account
UkoeHB Mar 3, 2022
e583c0b
seraphis mega squash commit [initial commit - 05/15/2023]; see seraph…
UkoeHB Sep 3, 2021
ca6d109
async: explicit task constructors
UkoeHB May 15, 2023
fc3fa5f
rebase fixes
UkoeHB May 16, 2023
e86d813
make JamtisDestinationV1 serializable (#11)
DangerousFreedom1984 Jun 8, 2023
5c28da7
compile fix
UkoeHB Jul 14, 2023
6a74e16
clarify SpBasicEnoteRecordV1 docs; add async unit test for custom joins
UkoeHB Aug 31, 2023
a32b787
remove broken perf tests
UkoeHB Sep 10, 2023
7a9b7d6
add operator== to JamtisPaymentProposals (#18)
DangerousFreedom1984 Oct 18, 2023
a8041ed
make JamtisPaymentProposal serializable (#21)
DangerousFreedom1984 Oct 23, 2023
0ade045
util to convert legacy outputs to seraphis lib compatible enotes (#22)
j-berman Oct 24, 2023
48ae432
container_helpers: is_sorted_and_unique 3x fewer comparison ops (#19)
Oct 24, 2023
e68cd54
modify construct_tx_for_mock_ledger_v1 so it outputs the JamtisPaymen…
DangerousFreedom1984 Oct 29, 2023
7e6e8aa
rebase fixes
UkoeHB Feb 8, 2024
42f3730
fix unbound issue
UkoeHB Feb 9, 2024
de30f2a
missing header
UkoeHB Feb 9, 2024
084d16e
c++17
UkoeHB Feb 9, 2024
b495fad
c++17
UkoeHB Feb 9, 2024
ce93774
split variant into variant and optional (#28)
Feb 16, 2024
36610a3
unit_tests: variant: fix for optional_variant (#30)
Feb 21, 2024
99288f0
derive view_balance from master key (#29)
DangerousFreedom1984 Feb 22, 2024
8d14b42
fix typo in header
UkoeHB Feb 23, 2024
111e58a
free function serialization DSL (#32)
Mar 5, 2024
19a3fdc
seraphis_main: add validation helpers for legacy txs
jeffro256 Mar 3, 2024
e915921
comments about what each validation function does
jeffro256 Mar 6, 2024
944bf7c
add mixability validation support
jeffro256 Mar 11, 2024
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
path = external/supercop
url = https://github.com/monero-project/supercop
branch = monero
[submodule "external/mx25519"]
path = external/mx25519
url = https://github.com/tevador/mx25519
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ if(NOT MANUAL_SUBMODULES)
check_submodule(external/trezor-common)
check_submodule(external/randomx)
check_submodule(external/supercop)
check_submodule(external/mx25519)
endif()
endif()

Expand Down Expand Up @@ -458,7 +459,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
set(BSDI TRUE)
endif()

include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include)
include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external external/supercop/include external/mx25519/include)

if(APPLE)
cmake_policy(SET CMP0042 NEW)
Expand Down
1 change: 1 addition & 0 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ add_subdirectory(db_drivers)
add_subdirectory(easylogging++)
add_subdirectory(qrcodegen)
add_subdirectory(randomx EXCLUDE_FROM_ALL)
add_subdirectory(mx25519)
1 change: 1 addition & 0 deletions external/mx25519
Submodule mx25519 added at 84ca12
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ endfunction ()
include(Version)
monero_add_library(version SOURCES ${CMAKE_BINARY_DIR}/version.cpp DEPENDS genversion)

add_subdirectory(async)
add_subdirectory(common)
add_subdirectory(crypto)
add_subdirectory(ringct)
Expand All @@ -96,7 +97,11 @@ add_subdirectory(hardforks)
add_subdirectory(blockchain_db)
add_subdirectory(mnemonics)
add_subdirectory(rpc)
add_subdirectory(seraphis_core)
add_subdirectory(seraphis_crypto)
add_subdirectory(seraphis_impl)
add_subdirectory(seraphis_main)
add_subdirectory(seraphis_mocks)
if(NOT IOS)
add_subdirectory(serialization)
endif()
Expand Down
51 changes: 51 additions & 0 deletions src/async/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (c) 2021, The Monero Project
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other
# materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be
# used to endorse or promote products derived from this software without specific
# prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
# THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

set(async_sources
sleepy_task_queue.cpp
task_types.cpp
threadpool.cpp
waiter_manager.cpp)

monero_find_all_headers(async_headers, "${CMAKE_CURRENT_SOURCE_DIR}")

monero_add_library(async
${async_sources}
${async_headers})

target_link_libraries(async
PUBLIC
common
PRIVATE
${EXTRA_LIBRARIES})

target_include_directories(async
PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}"
PRIVATE
${Boost_INCLUDE_DIRS})
87 changes: 87 additions & 0 deletions src/async/misc_utils.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// Copyright (c) 2023, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

/// Miscellaneous async utils.

#pragma once

//local headers
#include "common/expect.h"

//third-party headers

//standard headers
#include <chrono>
#include <future>

//forward declarations


namespace async
{
//-------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
template <typename T>
bool future_is_ready(const std::future<T> &future)
{
try
{
if (!future.valid())
return false;
if (future.wait_for(std::chrono::seconds(0)) != std::future_status::ready)
return false;
} catch (...) { return false; }
return true;
}
//-------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
template <typename T>
bool future_is_ready(const std::shared_future<T> &future)
{
try
{
if (!future.valid())
return false;
if (future.wait_for(std::chrono::seconds(0)) != std::future_status::ready)
return false;
} catch (...) { return false; }
return true;
}
//-------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
template <typename R>
expect<R> unwrap_future(std::future<R> &future)
{
if (!future_is_ready(future)) { return std::error_code{}; }
try { return std::move(future.get()); }
catch (std::error_code e) { return e; }
catch (...) { return std::error_code{}; }
}
//-------------------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------------------
} //namespace async
Loading