diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index 94eb5f4a4..5604b8c97 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -12,6 +12,8 @@ jobs:
build-windows:
name: Windows
runs-on: windows-2022
+ permissions:
+ contents: write
env:
BOOST_ROOT: C:/local/boost_1_83_0
steps:
@@ -27,10 +29,10 @@ jobs:
echo "release_name=${release_name}" >> $env:GITHUB_OUTPUT
- name: Install msbuild
- uses: microsoft/setup-msbuild@v2
+ uses: microsoft/setup-msbuild@v3
- name: Restore Boost
- uses: actions/cache@v4
+ uses: actions/cache@v5
id: restore-boost
with:
path: ${{env.BOOST_ROOT}}
@@ -64,7 +66,7 @@ jobs:
cp build/tests/Release/*_tests.exe build/conceal
- name: Upload To GH Artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: ${{ steps.setup.outputs.release_name }}
path: build/conceal
@@ -99,6 +101,8 @@ jobs:
build-mingw:
name: MinGW
runs-on: windows-2022
+ permissions:
+ contents: write
defaults:
run:
shell: msys2 {0}
@@ -148,7 +152,7 @@ jobs:
cp build/tests/*_tests.exe build/conceal
- name: Upload To GH Artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: ${{ steps.setup.outputs.release_name }}
path: build/conceal
@@ -183,6 +187,8 @@ jobs:
build-ubuntu22:
name: Ubuntu 22.04
runs-on: ubuntu-22.04
+ permissions:
+ contents: write
steps:
- uses: actions/checkout@master
@@ -217,7 +223,7 @@ jobs:
cp build/tests/*_tests build/conceal
- name: Upload To GH Artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: ${{ steps.setup.outputs.release_name }}
path: build/conceal
@@ -253,6 +259,8 @@ jobs:
build-ubuntu24:
name: Ubuntu 24.04
runs-on: ubuntu-24.04
+ permissions:
+ contents: write
steps:
- uses: actions/checkout@master
@@ -287,7 +295,7 @@ jobs:
cp build/tests/*_tests build/conceal
- name: Upload To GH Artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: ${{ steps.setup.outputs.release_name }}
path: build/conceal
@@ -323,6 +331,8 @@ jobs:
build-ubuntu22-clang:
name: Ubuntu 22.04 clang
runs-on: ubuntu-22.04
+ permissions:
+ contents: write
steps:
- uses: actions/checkout@master
@@ -357,7 +367,7 @@ jobs:
cp build/tests/*_tests build/conceal
- name: Upload To GH Artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: ${{ steps.setup.outputs.release_name }}
path: build/conceal
@@ -392,7 +402,9 @@ jobs:
build-macos:
name: macOS
- runs-on: macos-13
+ runs-on: macos-15-intel
+ permissions:
+ contents: write
steps:
- uses: actions/checkout@master
@@ -406,14 +418,15 @@ jobs:
- name: Install dependencies
run: |
- brew install boost@1.85
+ brew install boost
+ brew list --versions boost
- name: Build
id: build
run: |
mkdir build
cd build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DSTATIC=ON -DBOOST_ROOT=/usr/local/opt/boost@1.85
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DSTATIC=ON -DBOOST_ROOT="$(brew --prefix boost)"
make -j2
- name: Prepare release
@@ -426,7 +439,7 @@ jobs:
cp build/tests/*_tests build/conceal
- name: Upload To GH Artifacts
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: ${{ steps.setup.outputs.release_name }}
path: build/conceal
diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml
index 03aab0c24..63ca808dd 100644
--- a/.github/workflows/macOS.yml
+++ b/.github/workflows/macOS.yml
@@ -4,11 +4,13 @@ on:
push:
tags:
- "*"
-
+
jobs:
build-macos:
name: macOS
- runs-on: macos-13
+ runs-on: macos-15-intel
+ permissions:
+ contents: write
steps:
- uses: actions/checkout@master
diff --git a/.github/workflows/ubuntu22.yml b/.github/workflows/ubuntu22.yml
index e82b4d8b0..f841ee39a 100644
--- a/.github/workflows/ubuntu22.yml
+++ b/.github/workflows/ubuntu22.yml
@@ -9,6 +9,8 @@ jobs:
build-ubuntu22:
name: Ubuntu 22.04
runs-on: ubuntu-22.04
+ permissions:
+ contents: write
steps:
- uses: actions/checkout@master
diff --git a/.github/workflows/ubuntu24.yml b/.github/workflows/ubuntu24.yml
index 2e2e338f6..ce5c12dc6 100644
--- a/.github/workflows/ubuntu24.yml
+++ b/.github/workflows/ubuntu24.yml
@@ -4,11 +4,13 @@ on:
push:
tags:
- "*"
-
+
jobs:
build-ubuntu24:
name: Ubuntu 24.04
runs-on: ubuntu-24.04
+ permissions:
+ contents: write
steps:
- uses: actions/checkout@master
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 38b3522a7..c147ce0c5 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -9,13 +9,15 @@ jobs:
build-windows:
name: Windows
runs-on: windows-2022
+ permissions:
+ contents: write
env:
BOOST_ROOT: C:/local/boost_1_83_0
steps:
- uses: actions/checkout@master
- name: Setup msbuild
- uses: microsoft/setup-msbuild@v2
+ uses: microsoft/setup-msbuild@v3
- name: Restore Boost
uses: actions/cache@v4
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ac2b6ed9..243555180 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.5)
include(CheckCXXCompilerFlag)
-set(VERSION "6.7.3")
+set(VERSION "6.7.4-beta.1")
set(VERSION_BUILD_NO "Trebopala")
# Packaged from main commits
set(COMMIT 1db6e66)
@@ -112,7 +112,8 @@ else()
endif()
if(MINGW)
set(WARNINGS "${WARNINGS} -Wno-error=unused-value")
- set(MINGW_FLAG "-DWIN32_LEAN_AND_MEAN")
+ # Boost.Bind: avoid deprecated global placeholders (_1, _2) pragma on newer Boost
+ set(MINGW_FLAG "-DWIN32_LEAN_AND_MEAN -DBOOST_BIND_GLOBAL_PLACEHOLDERS")
include_directories(SYSTEM src/platform/mingw)
else()
set(MINGW_FLAG "")
@@ -144,6 +145,10 @@ if(APPLE)
add_definitions(/DHAVE_ROTR)
endif()
+if(POLICY CMP0167)
+ cmake_policy(SET CMP0167 OLD)
+endif()
+
if(STATIC)
set(Boost_NO_BOOST_CMAKE ON)
set(Boost_USE_STATIC_LIBS ON)
@@ -151,9 +156,23 @@ if(STATIC)
endif()
#set(Boost_DEBUG on)
-find_package(Boost 1.55 REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization program_options)
+set(BOOST_COMPONENTS filesystem thread date_time chrono regex serialization program_options)
+
+if(APPLE)
+ find_package(Boost 1.55 COMPONENTS system ${BOOST_COMPONENTS})
+ if(NOT Boost_FOUND)
+ message(STATUS "Boost.System library not found; retrying without system component")
+ find_package(Boost 1.55 REQUIRED COMPONENTS ${BOOST_COMPONENTS})
+ endif()
+else()
+ find_package(Boost 1.55 REQUIRED COMPONENTS system ${BOOST_COMPONENTS})
+endif()
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
+if(Boost_VERSION AND NOT Boost_VERSION VERSION_LESS 1.90.0)
+ add_definitions(-DBOOST_ASIO_HAS_IO_CONTEXT)
+endif()
+
if(MINGW)
set(Boost_LIBRARIES "${Boost_LIBRARIES};ws2_32;mswsock;bcrypt")
elseif(APPLE)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ab99bfa93..300b2bc7f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,12 +1,14 @@
Development Process
-Developers work in their own trees, then submit pull requests when they think their feature or bug fix is ready.
+Contributors should work from their own fork of the repository (not push branches directly to the upstream repo unless they are maintainers with that workflow). When you start a change, create a branch named `/`: use a three-letter identifier derived from your name or handle, then a short topic (often kebab-case words). Examples for someone named John Doe: `jdo/fix`, `doe/dependencies`.
+
+Open pull requests against the upstream **`development`** branch when you consider your feature or bug fix ready.
The patch will be accepted if there is broad consensus that it is a good thing. Developers should expect to rework and resubmit patches if they don't match the project's coding conventions or are controversial.
-The master branch is regularly built and tested, but is not guaranteed to be completely stable. Tags are regularly created to indicate new official, stable release versions of Conceal.
+The `development` branch is regularly built and tested, but is not guaranteed to be completely stable. Tags are regularly created to indicate new official, stable release versions of Conceal.
-Feature branches are created when there are major new features being worked on by several people.
+Feature branches on upstream may be created when there are major new features being worked on by several people.
From time to time a pull request will become outdated. If this occurs, and the pull is no longer automatically mergeable; a comment on the pull will be used to issue a warning of closure. The pull will be closed 15 days after the warning if action is not taken by the author. Pull requests closed in this manner will have their corresponding issue labeled 'stagnant'.
diff --git a/external/parallel_hashmap/phmap.h b/external/parallel_hashmap/phmap.h
index 37f0f7c14..194e4f600 100644
--- a/external/parallel_hashmap/phmap.h
+++ b/external/parallel_hashmap/phmap.h
@@ -2753,7 +2753,7 @@ class parallel_hash_set
std::is_nothrow_default_constructible::value&&
std::is_nothrow_default_constructible::value) {}
-#if (__cplusplus >= 201703L || _MSVC_LANG >= 201402) && (defined(_MSC_VER) || defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 6))
+#if (__cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402)) && (defined(_MSC_VER) || defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 6))
explicit parallel_hash_set(size_t bucket_cnt,
const hasher& hash_param = hasher(),
const key_equal& eq = key_equal(),
diff --git a/src/CryptoNoteConfig.h b/src/CryptoNoteConfig.h
index 4bde41c38..c9384feab 100644
--- a/src/CryptoNoteConfig.h
+++ b/src/CryptoNoteConfig.h
@@ -1,6 +1,6 @@
// Copyright (c) 2012-2017 The Cryptonote developers
// Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs
-// Copyright (c) 2018-2023 Conceal Network & Conceal Devs
+// Copyright (c) 2018-2026 Conceal Network & Conceal Devs
//
//
// Distributed under the MIT/X11 software license, see the accompanying
diff --git a/src/InProcessNode/InProcessNode.cpp b/src/InProcessNode/InProcessNode.cpp
index e72be2730..59ff26582 100644
--- a/src/InProcessNode/InProcessNode.cpp
+++ b/src/InProcessNode/InProcessNode.cpp
@@ -63,13 +63,17 @@ void InProcessNode::init(const Callback& callback) {
protocol.addObserver(this);
core.addObserver(this);
- work.reset(new boost::asio::io_service::work(ioService));
+#if defined(BOOST_ASIO_HAS_IO_CONTEXT)
+ work.reset(new InProcessNodeWork(ioService.get_executor()));
+#else
+ work.reset(new InProcessNodeWork(ioService));
+#endif
workerThread.reset(new std::thread(&InProcessNode::workerFunc, this));
state = INITIALIZED;
}
- ioService.post(std::bind(callback, ec));
+ postIoService(std::bind(callback, ec));
}
bool InProcessNode::shutdown() {
@@ -89,10 +93,18 @@ bool InProcessNode::doShutdown() {
work.reset();
ioService.stop();
workerThread->join();
- ioService.reset();
+ resetIoService();
return true;
}
+void InProcessNode::resetIoService() {
+#if defined(BOOST_ASIO_HAS_IO_CONTEXT)
+ ioService.restart();
+#else
+ ioService.reset();
+#endif
+}
+
void InProcessNode::workerFunc() {
ioService.run();
}
@@ -107,7 +119,7 @@ void InProcessNode::getNewBlocks(std::vector&& knownBlockIds, std:
return;
}
- ioService.post(
+ postIoService(
std::bind(&InProcessNode::getNewBlocksAsync,
this,
std::move(knownBlockIds),
@@ -181,7 +193,7 @@ void InProcessNode::getTransactionOutsGlobalIndices(const crypto::Hash& transact
return;
}
- ioService.post(
+ postIoService(
std::bind(&InProcessNode::getTransactionOutsGlobalIndicesAsync,
this,
std::cref(transactionHash),
@@ -231,7 +243,7 @@ void InProcessNode::getRandomOutsByAmounts(std::vector&& amounts, uint
return;
}
- ioService.post(
+ postIoService(
std::bind(&InProcessNode::getRandomOutsByAmountsAsync,
this,
std::move(amounts),
@@ -288,7 +300,7 @@ void InProcessNode::relayTransaction(const cn::Transaction& transaction, const C
return;
}
- ioService.post(
+ postIoService(
std::bind(&InProcessNode::relayTransactionAsync,
this,
transaction,
@@ -457,7 +469,7 @@ void InProcessNode::queryBlocks(std::vector&& knownBlockIds, uint6
return;
}
- ioService.post(
+ postIoService(
std::bind(&InProcessNode::queryBlocksLiteAsync,
this,
std::move(knownBlockIds),
@@ -519,7 +531,7 @@ void InProcessNode::getPoolSymmetricDifference(std::vector&& known
return;
}
- ioService.post([this, knownPoolTxIds, knownBlockId, &isBcActual, &newTxs, &deletedTxIds, callback] () mutable {
+ postIoService([this, knownPoolTxIds, knownBlockId, &isBcActual, &newTxs, &deletedTxIds, callback] () mutable {
this->getPoolSymmetricDifferenceAsync(std::move(knownPoolTxIds), knownBlockId, isBcActual, newTxs, deletedTxIds, callback);
});
}
@@ -552,7 +564,7 @@ void InProcessNode::getMultisignatureOutputByGlobalIndex(uint64_t amount, uint32
return;
}
- ioService.post([this, amount, gindex, &out, callback]() mutable {
+ postIoService([this, amount, gindex, &out, callback]() mutable {
this->getOutByMSigGIndexAsync(amount, gindex, out, callback);
});
}
@@ -577,7 +589,7 @@ void InProcessNode::getBlocks(const std::vector& blockHeights, std::ve
return;
}
- ioService.post(
+ postIoService(
std::bind(
static_cast<
void(InProcessNode::*)(
@@ -661,7 +673,7 @@ void InProcessNode::getBlocks(const std::vector& blockHashes, std:
return;
}
- ioService.post(
+ postIoService(
std::bind(
static_cast<
void(InProcessNode::*)(
@@ -724,7 +736,7 @@ void InProcessNode::getBlocks(uint64_t timestampBegin, uint64_t timestampEnd, ui
return;
}
- ioService.post(
+ postIoService(
std::bind(
static_cast<
void(InProcessNode::*)(
@@ -800,7 +812,7 @@ void InProcessNode::getTransactions(const std::vector& transaction
return;
}
- ioService.post(
+ postIoService(
std::bind(
static_cast<
void(InProcessNode::*)(
@@ -865,7 +877,7 @@ void InProcessNode::getPoolTransactions(uint64_t timestampBegin, uint64_t timest
return;
}
- ioService.post(
+ postIoService(
std::bind(
&InProcessNode::getPoolTransactionsAsync,
this,
@@ -924,7 +936,7 @@ void InProcessNode::getTransactionsByPaymentId(const crypto::Hash& paymentId, st
return;
}
- ioService.post(
+ postIoService(
std::bind(
&InProcessNode::getTransactionsByPaymentIdAsync,
this,
@@ -945,7 +957,7 @@ void InProcessNode::getTransaction(const crypto::Hash &transactionHash, cn::Tran
return;
}
- ioService.post(
+ postIoService(
std::bind(
static_cast<
void (InProcessNode::*)(
@@ -1040,7 +1052,7 @@ void InProcessNode::isSynchronized(bool& syncStatus, const Callback& callback) {
return;
}
- ioService.post(
+ postIoService(
std::bind(
&InProcessNode::isSynchronizedAsync,
this,
diff --git a/src/InProcessNode/InProcessNode.h b/src/InProcessNode/InProcessNode.h
index a9b926875..c4cdf5d53 100644
--- a/src/InProcessNode/InProcessNode.h
+++ b/src/InProcessNode/InProcessNode.h
@@ -23,6 +23,14 @@ namespace cn {
class core;
+#if defined(BOOST_ASIO_HAS_IO_CONTEXT)
+using InProcessNodeIoContext = boost::asio::io_context;
+using InProcessNodeWork = boost::asio::executor_work_guard;
+#else
+using InProcessNodeIoContext = boost::asio::io_service;
+using InProcessNodeWork = boost::asio::io_service::work;
+#endif
+
class InProcessNode : public INode, public cn::ICryptoNoteProtocolObserver, public cn::ICoreObserver {
public:
InProcessNode(cn::ICore& core, cn::ICryptoNoteProtocolQuery& protocol);
@@ -124,6 +132,16 @@ class InProcessNode : public INode, public cn::ICryptoNoteProtocolObserver, publ
std::error_code doGetTransaction(const crypto::Hash &transactionHash, cn::Transaction &transaction);
void workerFunc();
bool doShutdown();
+ void resetIoService();
+
+ template
+ void postIoService(Handler handler) {
+#if defined(BOOST_ASIO_HAS_IO_CONTEXT)
+ boost::asio::post(ioService, handler);
+#else
+ ioService.post(handler);
+#endif
+ }
enum State {
NOT_INITIALIZED,
@@ -135,9 +153,9 @@ class InProcessNode : public INode, public cn::ICryptoNoteProtocolObserver, publ
cn::ICryptoNoteProtocolQuery& protocol;
tools::ObserverManager observerManager;
- boost::asio::io_service ioService;
+ InProcessNodeIoContext ioService;
std::unique_ptr workerThread;
- std::unique_ptr work;
+ std::unique_ptr work;
BlockchainExplorerDataBuilder blockchainExplorerDataBuilder;
diff --git a/src/PaymentGateService/main.cpp b/src/PaymentGateService/main.cpp
index 6307e6fc8..e0bd308c6 100644
--- a/src/PaymentGateService/main.cpp
+++ b/src/PaymentGateService/main.cpp
@@ -123,8 +123,10 @@ int daemonize() {
int runDaemon() {
#ifdef _WIN32
+ // Mutable buffer: SERVICE_TABLE_ENTRY expects LPSTR (non-const); string literals are const.
+ static char serviceDisplayName[] = "Payment Gate";
SERVICE_TABLE_ENTRY serviceTable[] {
- { "Payment Gate", serviceMain },
+ { serviceDisplayName, serviceMain },
{ NULL, NULL }
};