diff --git a/Builds/VisualStudio/stellar-core.vcxproj b/Builds/VisualStudio/stellar-core.vcxproj
index 9573209abc..270d04b14c 100644
--- a/Builds/VisualStudio/stellar-core.vcxproj
+++ b/Builds/VisualStudio/stellar-core.vcxproj
@@ -125,7 +125,7 @@
Disabled
true
CEREAL_THREAD_SAFE;USE_POSTGRES;ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION=1;USE_SPDLOG;FMT_HEADER_ONLY=1;BUILD_TESTS;WIN32_LEAN_AND_MEAN;NOMINMAX;ASIO_STANDALONE;_WINSOCK_DEPRECATED_NO_WARNINGS;SODIUM_STATIC;ASIO_SEPARATE_COMPILATION;ASIO_ERROR_CATEGORY_NOEXCEPT=noexcept;TRACY_ENABLE;TRACY_ON_DEMAND;TRACY_NO_BROADCAST;TRACY_ONLY_LOCALHOST;TRACY_DELAYED_INIT;TRACY_MANUAL_LIFETIME;USE_TRACY;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0601;WIN32;_MBCS;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions)
- src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories)
+ src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories)
true
false
4060;4100;4127;4324;4408;4510;4512;4582;4583;4592
@@ -186,7 +186,7 @@ exit /b 0
Disabled
true
CEREAL_THREAD_SAFE;USE_POSTGRES;USE_SPDLOG;FMT_HEADER_ONLY=1;BUILD_TESTS;WIN32_LEAN_AND_MEAN;NOMINMAX;ASIO_STANDALONE;_WINSOCK_DEPRECATED_NO_WARNINGS;SODIUM_STATIC;ASIO_SEPARATE_COMPILATION;ASIO_ERROR_CATEGORY_NOEXCEPT=noexcept;TRACY_ENABLE;TRACY_ON_DEMAND;TRACY_NO_BROADCAST;TRACY_ONLY_LOCALHOST;TRACY_DELAYED_INIT;TRACY_MANUAL_LIFETIME;USE_TRACY;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0601;WIN32;_MBCS;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions)
- src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories)
+ src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories)
true
false
4060;4100;4127;4324;4408;4510;4512;4582;4583;4592
@@ -248,7 +248,7 @@ exit /b 0
Disabled
true
CEREAL_THREAD_SAFE;ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION=1;USE_SPDLOG;FMT_HEADER_ONLY=1;BUILD_TESTS;WIN32_LEAN_AND_MEAN;NOMINMAX;ASIO_STANDALONE;_WINSOCK_DEPRECATED_NO_WARNINGS;SODIUM_STATIC;ASIO_SEPARATE_COMPILATION;ASIO_ERROR_CATEGORY_NOEXCEPT=noexcept;TRACY_ENABLE;TRACY_ON_DEMAND;TRACY_NO_BROADCAST;TRACY_ONLY_LOCALHOST;TRACY_DELAYED_INIT;TRACY_MANUAL_LIFETIME;USE_TRACY;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0601;WIN32;_MBCS;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions)
- src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories)
+ src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories)
true
false
4060;4100;4127;4324;4408;4510;4512;4582;4583;4592
@@ -314,7 +314,7 @@ exit /b 0
true
true
CEREAL_THREAD_SAFE;USE_POSTGRES;ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION=1;USE_SPDLOG;FMT_HEADER_ONLY=1;BUILD_TESTS;WIN32_LEAN_AND_MEAN;NOMINMAX;ASIO_STANDALONE;_WINSOCK_DEPRECATED_NO_WARNINGS;SODIUM_STATIC;ASIO_SEPARATE_COMPILATION;ASIO_ERROR_CATEGORY_NOEXCEPT=noexcept;TRACY_ENABLE;TRACY_ON_DEMAND;TRACY_NO_BROADCAST;TRACY_ONLY_LOCALHOST;TRACY_DELAYED_INIT;TRACY_MANUAL_LIFETIME;USE_TRACY;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0601;WIN32;_MBCS;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions)
- src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories)
+ src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories)
false
true
4060;4100;4127;4324;4408;4510;4512;4582;4583;4592
@@ -375,7 +375,7 @@ exit /b 0
true
true
CEREAL_THREAD_SAFE;USE_POSTGRES;USE_SPDLOG;FMT_HEADER_ONLY=1;BUILD_TESTS;WIN32_LEAN_AND_MEAN;NOMINMAX;ASIO_STANDALONE;_WINSOCK_DEPRECATED_NO_WARNINGS;SODIUM_STATIC;ASIO_SEPARATE_COMPILATION;ASIO_ERROR_CATEGORY_NOEXCEPT=noexcept;TRACY_ENABLE;TRACY_ON_DEMAND;TRACY_NO_BROADCAST;TRACY_ONLY_LOCALHOST;TRACY_DELAYED_INIT;TRACY_MANUAL_LIFETIME;USE_TRACY;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0601;WIN32;_MBCS;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions)
- src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories)
+ src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories)
false
true
4060;4100;4127;4324;4408;4510;4512;4582;4583;4592
@@ -430,6 +430,34 @@ exit /b 0
+
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+
+
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+
+
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+
+
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+ $(IntDir)\httpthreaded\
+
@@ -592,6 +620,7 @@ exit /b 0
+
@@ -657,6 +686,7 @@ exit /b 0
+
@@ -699,6 +729,7 @@ exit /b 0
+
@@ -709,12 +740,14 @@ exit /b 0
+
+
@@ -875,6 +908,12 @@ exit /b 0
+
+
+
+
+
+
@@ -1013,6 +1052,7 @@ exit /b 0
+
@@ -1066,6 +1106,7 @@ exit /b 0
+
@@ -1081,6 +1122,7 @@ exit /b 0
+
@@ -1089,6 +1131,7 @@ exit /b 0
+
@@ -1584,8 +1627,8 @@ exit /b 0
Document
- $(OutDir)\bin\cxxbridge.exe ..\..\src\rust\src\lib.rs --header --output src\$(Configuration)\generated\rust\RustBridge.h
-$(OutDir)\bin\cxxbridge.exe ..\..\src\rust\src\lib.rs --output src\$(Configuration)\generated\rust\RustBridge.cpp
+ $(OutDir)\bin\cxxbridge.exe ..\..\src\rust\src\lib.rs --cfg test=false --header --output src\$(Configuration)\generated\rust\RustBridge.h
+$(OutDir)\bin\cxxbridge.exe ..\..\src\rust\src\lib.rs --cfg test=false --output src\$(Configuration)\generated\rust\RustBridge.cpp
running cxxbridge to generate RustBridge.h and RustBridge.cpp
src\$(Configuration)\generated\rust\RustBridge.h;src\$(Configuration)\generated\rust\RustBridge.cpp
ClInclude
diff --git a/Builds/VisualStudio/stellar-core.vcxproj.filters b/Builds/VisualStudio/stellar-core.vcxproj.filters
index 596e96c518..4a07238234 100644
--- a/Builds/VisualStudio/stellar-core.vcxproj.filters
+++ b/Builds/VisualStudio/stellar-core.vcxproj.filters
@@ -178,6 +178,9 @@
{f421dda1-de1d-43af-b5b8-138a24c87cd2}
+
+ {feb33c2b-4955-4db8-b62d-72cbc3129a44}
+
@@ -1347,6 +1350,33 @@
overlay
+
+ transactions\tests
+
+
+ util
+
+
+ util\tests
+
+
+ transactions
+
+
+ lib\httpthreaded
+
+
+ lib\httpthreaded
+
+
+ lib\httpthreaded
+
+
+ lib\httpthreaded
+
+
+ main
+
@@ -2342,6 +2372,36 @@
overlay
+
+ transactions\tests
+
+
+ util
+
+
+ transactions
+
+
+ lib\httpthreaded
+
+
+ lib\httpthreaded
+
+
+ lib\httpthreaded
+
+
+ lib\httpthreaded
+
+
+ lib\httpthreaded
+
+
+ lib\httpthreaded
+
+
+ main
+
diff --git a/lib/binaryfusefilter.h b/lib/binaryfusefilter.h
index e7c59793e0..22dd42e041 100644
--- a/lib/binaryfusefilter.h
+++ b/lib/binaryfusefilter.h
@@ -41,7 +41,7 @@ sip_hash24(uint64_t key, binary_fuse_seed_t const& seed)
static inline uint64_t
binary_fuse_rotl64(uint64_t n, unsigned int c)
{
- return (n << (c & 63)) | (n >> ((-c) & 63));
+ return (n << (c & 63)) | (n >> ((0u - c) & 63));
}
static inline uint32_t
binary_fuse_reduce(uint32_t hash, uint32_t n)
diff --git a/src/bucket/BucketIndexImpl.cpp b/src/bucket/BucketIndexImpl.cpp
index c879cfa6ee..029f00b542 100644
--- a/src/bucket/BucketIndexImpl.cpp
+++ b/src/bucket/BucketIndexImpl.cpp
@@ -84,7 +84,7 @@ BucketIndexImpl::BucketIndexImpl(BucketManager& bm,
// the page size ahead of time
if constexpr (std::is_same::value)
{
- auto fileSize = fs::size(filename);
+ auto fileSize = std::filesystem::file_size(filename);
auto estimatedIndexEntries = fileSize / mData.pageSize;
mData.keysToOffset.reserve(estimatedIndexEntries);
}
diff --git a/src/bucket/BucketListSnapshot.h b/src/bucket/BucketListSnapshot.h
index 313095b3aa..f268d2ced2 100644
--- a/src/bucket/BucketListSnapshot.h
+++ b/src/bucket/BucketListSnapshot.h
@@ -64,7 +64,7 @@ class SearchableBucketListSnapshot : public NonMovableOrCopyable
SearchableBucketListSnapshot(BucketSnapshotManager const& snapshotManager);
- friend std::unique_ptr
+ friend std::shared_ptr
BucketSnapshotManager::copySearchableBucketListSnapshot() const;
public:
diff --git a/src/bucket/BucketManagerImpl.cpp b/src/bucket/BucketManagerImpl.cpp
index 8e87f9daf4..f428b50850 100644
--- a/src/bucket/BucketManagerImpl.cpp
+++ b/src/bucket/BucketManagerImpl.cpp
@@ -1000,6 +1000,8 @@ BucketManagerImpl::startBackgroundEvictionScan(uint32_t ledgerSeq)
auto const& sas = cfg.stateArchivalSettings();
using task_t = std::packaged_task;
+ // MSVC gotcha: searchableBL has to be shared_ptr because MSVC wants to
+ // copy this lambda, otherwise we could use unique_ptr.
auto task = std::make_shared(
[bl = std::move(searchableBL), iter = cfg.evictionIterator(), ledgerSeq,
sas, &counters = mBucketListEvictionCounters,
diff --git a/src/bucket/BucketSnapshotManager.cpp b/src/bucket/BucketSnapshotManager.cpp
index e713853660..373e3e8002 100644
--- a/src/bucket/BucketSnapshotManager.cpp
+++ b/src/bucket/BucketSnapshotManager.cpp
@@ -31,11 +31,11 @@ BucketSnapshotManager::BucketSnapshotManager(
releaseAssert(threadIsMain());
}
-std::unique_ptr
+std::shared_ptr
BucketSnapshotManager::copySearchableBucketListSnapshot() const
{
- // Can't use std::make_unique due to private constructor
- return std::unique_ptr(
+ // Can't use std::make_shared due to private constructor
+ return std::shared_ptr(
new SearchableBucketListSnapshot(*this));
}
diff --git a/src/bucket/BucketSnapshotManager.h b/src/bucket/BucketSnapshotManager.h
index 8b74043780..0a093585d8 100644
--- a/src/bucket/BucketSnapshotManager.h
+++ b/src/bucket/BucketSnapshotManager.h
@@ -81,7 +81,7 @@ class BucketSnapshotManager : NonMovableOrCopyable
std::unique_ptr&& snapshot,
uint32_t numHistoricalLedgers);
- std::unique_ptr
+ std::shared_ptr
copySearchableBucketListSnapshot() const;
// Checks if snapshot is out of date with mCurrentSnapshot and updates
diff --git a/src/ledger/LedgerTxnImpl.h b/src/ledger/LedgerTxnImpl.h
index 625c267a40..4d71595f70 100644
--- a/src/ledger/LedgerTxnImpl.h
+++ b/src/ledger/LedgerTxnImpl.h
@@ -737,7 +737,7 @@ class LedgerTxnRoot::Impl
mutable BestOffers mBestOffers;
mutable uint64_t mPrefetchHits{0};
mutable uint64_t mPrefetchMisses{0};
- mutable std::unique_ptr
+ mutable std::shared_ptr
mSearchableBucketListSnapshot{};
size_t mBulkLoadBatchSize;
diff --git a/src/main/Config.cpp b/src/main/Config.cpp
index 67b5ef91a5..6c635532fb 100644
--- a/src/main/Config.cpp
+++ b/src/main/Config.cpp
@@ -996,6 +996,17 @@ Config::processConfig(std::shared_ptr t)
}
std::vector validators;
UnorderedMap domainQualityMap;
+ UnorderedMap uint32WithMax1Flags = {
+ {"PEER_READING_CAPACITY", &PEER_READING_CAPACITY},
+ {"PEER_FLOOD_READING_CAPACITY", &PEER_FLOOD_READING_CAPACITY},
+ {"FLOW_CONTROL_SEND_MORE_BATCH_SIZE",
+ &FLOW_CONTROL_SEND_MORE_BATCH_SIZE},
+ {"PEER_FLOOD_READING_CAPACITY_BYTES",
+ &PEER_FLOOD_READING_CAPACITY_BYTES},
+ {"FLOW_CONTROL_SEND_MORE_BATCH_SIZE_BYTES",
+ &FLOW_CONTROL_SEND_MORE_BATCH_SIZE_BYTES},
+ {"OUTBOUND_TX_QUEUE_BYTE_LIMIT", &OUTBOUND_TX_QUEUE_BYTE_LIMIT},
+ };
// cpptoml returns the items in non-deterministic order
// so we need to process items that are potential dependencies first
@@ -1012,33 +1023,14 @@ Config::processConfig(std::shared_ptr t)
logIfSet(item,
"node may not function properly with most networks");
}
-
- if (item.first == "PEER_READING_CAPACITY")
- {
- PEER_READING_CAPACITY = readInt(item, 1);
- }
- else if (item.first == "PEER_FLOOD_READING_CAPACITY")
+ auto uint32WithMax1It = uint32WithMax1Flags.find(item.first);
+ if (uint32WithMax1It != uint32WithMax1Flags.end())
{
- PEER_FLOOD_READING_CAPACITY = readInt(item, 1);
+ *uint32WithMax1It->second = readInt(item, 1);
+ continue;
}
- else if (item.first == "FLOW_CONTROL_SEND_MORE_BATCH_SIZE")
- {
- FLOW_CONTROL_SEND_MORE_BATCH_SIZE = readInt(item, 1);
- }
- else if (item.first == "PEER_FLOOD_READING_CAPACITY_BYTES")
- {
- PEER_FLOOD_READING_CAPACITY_BYTES = readInt(item, 1);
- }
- else if (item.first == "FLOW_CONTROL_SEND_MORE_BATCH_SIZE_BYTES")
- {
- FLOW_CONTROL_SEND_MORE_BATCH_SIZE_BYTES =
- readInt(item, 1);
- }
- else if (item.first == "OUTBOUND_TX_QUEUE_BYTE_LIMIT")
- {
- OUTBOUND_TX_QUEUE_BYTE_LIMIT = readInt(item, 1);
- }
- else if (item.first == "PEER_PORT")
+
+ if (item.first == "PEER_PORT")
{
PEER_PORT = readInt(item, 1);
}
diff --git a/src/main/QueryServer.h b/src/main/QueryServer.h
index 4c72384ac2..f16a79c945 100644
--- a/src/main/QueryServer.h
+++ b/src/main/QueryServer.h
@@ -26,7 +26,7 @@ class QueryServer
httpThreaded::server::server mServer;
std::unordered_map>
+ std::shared_ptr>
mBucketListSnapshots;
bool safeRouter(HandlerRoute route, std::string const& params,
diff --git a/src/rust/src/contract.rs b/src/rust/src/contract.rs
index f777dd1d90..80642b5499 100644
--- a/src/rust/src/contract.rs
+++ b/src/rust/src/contract.rs
@@ -204,9 +204,9 @@ pub fn get_soroban_version_info(core_max_proto: u32) -> SorobanVersionInfo {
}
if core_max_proto != env_max_proto {
warn!(
- "soroban version {} XDR module built with 'next' feature, \
+ "soroban version {} XDR module for env version {} built with 'next' feature, \
even though this is not the newest core protocol ({})",
- VERSION.pkg, core_max_proto
+ VERSION.pkg, env_max_proto, core_max_proto
);
warn!(
"this can happen if multiple soroban crates depend on the \