Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion cmake/deps/OpenSSL.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
find_package(OpenSSL 1.1.1 REQUIRED CONFIG)
find_package(OpenSSL REQUIRED CONFIG)

set_target_properties(
OpenSSL::SSL
Expand Down
68 changes: 42 additions & 26 deletions conan.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"version": "0.5",
"requires": [
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1765850150.075",
"zlib/1.3.1#cac0f6daea041b0ccf42934163defb20%1774439233.809",
"xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1765850149.987",
"xrpl/3.1.0#3d408ab8c8020014fa7dd52bc7cc7ea8%1769706825.165",
"sqlite3/3.49.1#8631739a4c9b93bd3d6b753bac548a63%1765850149.926",
"xrpl/3.2.0-b0@peter/confidentialmpts#03aad709ac8e01a6c38068ccc86c2d8f%1775752957.332",
"sqlite3/3.51.0#66aa11eabd0e34954c5c1c061ad44abe%1774467355.988",
"spdlog/1.17.0#bcbaaf7147bda6ad24ffbd1ac3d7142c%1768312128.781",
"soci/4.0.3#a9f8d773cd33e356b5879a4b0564f287%1765850149.46",
"re2/20230301#ca3b241baec15bd31ea9187150e0b333%1765850148.103",
"soci/4.0.3#fe32b9ad5eb47e79ab9e45a68f363945%1774450067.231",
"secp256k1/0.7.1#481881709eb0bdd0185a12b912bbe8ad%1770910500.329",
"re2/20251105#8579cfd0bda4daf0683f9e3898f964b4%1774398111.888",
"rapidjson/cci.20220822#1b9d8c2256876a154172dc5cfbe447c6%1754325007.656",
"protobuf/3.21.12#44ee56c0a6eea0c19aeeaca680370b88%1764175361.456",
"openssl/1.1.1w#a8f0792d7c5121b954578a7149d23e03%1756223730.729",
"nudb/2.0.9#0432758a24204da08fee953ec9ea03cb%1769436073.32",
"protobuf/6.33.5#d96d52ba5baaaa532f47bda866ad87a5%1774467363.12",
"openssl/3.6.1#e6399de266349245a4542fc5f6c71552%1774458290.139",
"nudb/2.0.9#11149c73f8f2baff9a0198fe25971fc7%1775040983.408",
"mpt-crypto/0.2.0-rc1#ed3f241f69d8b9ebf80069d1923d93a8%1773853481.755",
"minizip/1.2.13#9e87d57804bd372d6d1e32b1871517a3%1754325004.374",
"lz4/1.10.0#59fc63cac7f10fbe8e05c7e62c2f3504%1765850143.914",
"libuv/1.46.0#dc28c1f653fa197f00db5b577a6f6011%1754325003.592",
Expand All @@ -20,42 +22,56 @@
"libarchive/3.8.1#ffee18995c706e02bf96e7a2f7042e0d%1765850144.736",
"http_parser/2.9.4#98d91690d6fd021e9e624218a85d9d97%1754325001.385",
"gtest/1.17.0#5224b3b3ff3b4ce1133cbdd27d53ee7d%1768312129.152",
"grpc/1.50.1#02291451d1e17200293a409410d1c4e1%1756234248.958",
"grpc/1.78.1#b1a9e74b145cc471bed4dc64dc6eb2c1%1774467387.342",
"fmt/12.1.0#50abab23274d56bb8f42c94b3b9a40c7%1763984116.926",
"doctest/2.4.11#a4211dfc329a16ba9f280f9574025659%1756234220.819",
"ed25519/2015.03#ae761bdc52730a843f0809bdf6c1b1f6%1765850143.772",
"date/3.0.4#862e11e80030356b53c2c38599ceb32b%1765850143.772",
"cassandra-cpp-driver/2.17.0#bd3934138689482102c265d01288a316%1764175359.611",
"c-ares/1.34.5#5581c2b62a608b40bb85d965ab3ec7c8%1765850144.336",
"c-ares/1.34.6#545240bb1c40e2cacd4362d6b8967650%1774439234.681",
"bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321%1765850143.837",
"boost/1.83.0#91d8b1572534d2c334d6790e3c34d0c1%1764175359.61",
"boost/1.90.0#d5e8defe7355494953be18524a7f135b%1769454080.269",
"benchmark/1.9.4#ce4403f7a24d3e1f907cd9da4b678be4%1754578869.672",
"abseil/20230802.1#90ba607d4ee8fb5fb157c3db540671fc%1764175359.429"
"abseil/20250127.0#bb0baf1f362bc4a725a24eddd419b8f7%1774365460.196"
],
"build_requires": [
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1765850150.075",
"protobuf/3.21.12#44ee56c0a6eea0c19aeeaca680370b88%1764175361.456",
"cmake/4.2.0#ae0a44f44a1ef9ab68fd4b3e9a1f8671%1765850153.937",
"cmake/3.31.10#313d16a1aa16bbdb2ca0792467214b76%1765850153.479",
"b2/5.3.3#107c15377719889654eb9a162a673975%1765850144.355"
"zlib/1.3.1#cac0f6daea041b0ccf42934163defb20%1774439233.809",
"protobuf/6.33.5#d96d52ba5baaaa532f47bda866ad87a5%1774467363.12",
"cmake/4.3.0#b939a42e98f593fb34d3a8c5cc860359%1774439249.183",
"cmake/3.31.11#f325c933f618a1fcebc1e1c0babfd1ba%1774439246.719",
"b2/5.4.2#ffd6084a119587e70f11cd45d1a386e2%1774439233.447",
"abseil/20250127.0#bb0baf1f362bc4a725a24eddd419b8f7%1774365460.196"
],
"python_requires": [],
"overrides": {
"protobuf/3.21.12#44ee56c0a6eea0c19aeeaca680370b88": [
"protobuf/6.33.5": [
null,
"protobuf/3.21.12"
"protobuf/6.33.5"
],
"boost/1.83.0#91d8b1572534d2c334d6790e3c34d0c1": [
"boost/1.90.0#d5e8defe7355494953be18524a7f135b": [
null,
"boost/1.83.0#91d8b1572534d2c334d6790e3c34d0c1"
"boost/1.90.0#d5e8defe7355494953be18524a7f135b"
],
"openssl/3.6.1#e6399de266349245a4542fc5f6c71552": [
null,
"openssl/3.6.1#e6399de266349245a4542fc5f6c71552"
],
"openssl/[>=1.1 <4]": [
"openssl/3.6.1"
],
"lz4/1.9.4": [
"lz4/1.10.0"
],
"boost/1.90.0": [
"boost/1.83.0"
"openssl/3.5.5": [
"openssl/3.6.1#e6399de266349245a4542fc5f6c71552"
],
"boost/[>=1.83.0 <1.91.0]": [
"boost/1.90.0"
],
"sqlite3/[>=3.44 <4]": [
"sqlite3/3.51.0"
],
"sqlite3/3.44.2": [
"sqlite3/3.49.1"
"boost/1.83.0": [
"boost/1.90.0"
]
},
"config_requires": []
Expand Down
11 changes: 6 additions & 5 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ class ClioConan(ConanFile):
requires = [
"cassandra-cpp-driver/2.17.0",
"fmt/12.1.0",
"grpc/1.50.1",
"grpc/1.78.1",
"libbacktrace/cci.20210118",
"openssl/1.1.1w",
"protobuf/3.21.12",
"protobuf/6.33.5",
"spdlog/1.17.0",
"xrpl/3.1.0",
"xrpl/3.2.0-b0@peter/confidentialmpts",
"zlib/1.3.1",
]

default_options = {
"boost/*:without_coroutine": False,
"cassandra-cpp-driver/*:shared": False,
"date/*:header_only": True,
"grpc/*:secure": True,
Expand All @@ -42,9 +42,10 @@ class ClioConan(ConanFile):
exports_sources = ("CMakeLists.txt", "cmake/*", "src/*")

def requirements(self):
self.requires("boost/1.83.0", force=True)
self.requires("boost/1.90.0", force=True)
self.requires("gtest/1.17.0")
self.requires("benchmark/1.9.4")
self.requires("openssl/3.6.1", force=True)

def configure(self):
if self.settings.compiler == "apple-clang":
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/config/example-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"cassandra": {
"contact_points": "127.0.0.1",
"port": 9042,
"keyspace": "clio",
"keyspace": "clio_5",
"replication_factor": 1,
"table_prefix": "",
"max_write_requests_outstanding": 25000,
Expand All @@ -31,8 +31,8 @@
"etl_sources": [
{
"ip": "127.0.0.1",
"ws_port": "6006",
"grpc_port": "50051"
"ws_port": "6007",
"grpc_port": "50052"
}
],
"forwarding": {
Expand Down
25 changes: 12 additions & 13 deletions src/data/AmendmentCenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ supportedAmendments()
bool
lookupAmendment(
auto const& allAmendments,
std::vector<ripple::uint256> const& ledgerAmendments,
std::vector<xrpl::uint256> const& ledgerAmendments,
std::string_view name
)
{
Expand Down Expand Up @@ -80,7 +80,7 @@ operator std::string_view() const
}

AmendmentKey::
operator ripple::uint256() const
operator xrpl::uint256() const
{
return Amendment::getAmendmentId(name);
}
Expand All @@ -92,14 +92,14 @@ AmendmentCenter::AmendmentCenter(std::shared_ptr<data::BackendInterface> const&
namespace vs = std::views;

rg::copy(
ripple::allAmendments() | vs::transform([&](auto const& p) {
xrpl::allAmendments() | vs::transform([&](auto const& p) {
auto const& [name, support] = p;
return Amendment{
.name = name,
.feature = Amendment::getAmendmentId(name),
.isSupportedByXRPL = support != ripple::AmendmentSupport::Unsupported,
.isSupportedByXRPL = support != xrpl::AmendmentSupport::Unsupported,
.isSupportedByClio = rg::contains(supportedAmendments(), name),
.isRetired = support == ripple::AmendmentSupport::Retired
.isRetired = support == xrpl::AmendmentSupport::Retired
};
}),
std::back_inserter(all_)
Expand Down Expand Up @@ -207,26 +207,25 @@ AmendmentCenter::operator[](AmendmentKey const& key) const
return getAmendment(key);
}

ripple::uint256
xrpl::uint256
Amendment::getAmendmentId(std::string_view name)
{
return ripple::sha512Half(ripple::Slice(name.data(), name.size()));
return xrpl::sha512Half(xrpl::Slice(name.data(), name.size()));
}

std::optional<std::vector<ripple::uint256>>
std::optional<std::vector<xrpl::uint256>>
AmendmentCenter::fetchAmendmentsList(boost::asio::yield_context yield, uint32_t seq) const
{
// the amendments should always be present on the ledger
auto const amendments =
backend_->fetchLedgerObject(ripple::keylet::amendments().key, seq, yield);
auto const amendments = backend_->fetchLedgerObject(xrpl::keylet::amendments().key, seq, yield);
if (not amendments.has_value())
throw std::runtime_error("Amendments ledger object must be present in the database");

ripple::SLE const amendmentsSLE{
ripple::SerialIter{amendments->data(), amendments->size()}, ripple::keylet::amendments().key
xrpl::SLE const amendmentsSLE{
xrpl::SerialIter{amendments->data(), amendments->size()}, xrpl::keylet::amendments().key
};

return amendmentsSLE[~ripple::sfAmendments];
return amendmentsSLE[~xrpl::sfAmendments];
}

} // namespace data
7 changes: 6 additions & 1 deletion src/data/AmendmentCenter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,17 @@ struct Amendments {
REGISTER(fixIncludeKeyletFields);
REGISTER(fixTokenEscrowV1);
REGISTER(LendingProtocol);
REGISTER(ConfidentialTransfer);
REGISTER(PermissionDelegationV1_1);

// Obsolete but supported by libxrpl
REGISTER(CryptoConditionsSuite);
REGISTER(NonFungibleTokensV1);
REGISTER(fixNFTokenDirV1);
REGISTER(fixNFTokenNegOffer);
REGISTER(fixExpiredNFTokenOfferRemoval);
REGISTER(fixPermissionedDomainInvariant);
REGISTER(fixSecurity3_1_3);

// Retired amendments
REGISTER(OwnerPaysFee); // Removed in xrpl 2.6.0 (https://github.com/XRPLF/rippled/pull/5435)
Expand Down Expand Up @@ -262,7 +267,7 @@ class AmendmentCenter : public AmendmentCenterInterface {
operator[](AmendmentKey const& key) const final;

private:
[[nodiscard]] std::optional<std::vector<ripple::uint256>>
[[nodiscard]] std::optional<std::vector<xrpl::uint256>>
fetchAmendmentsList(boost::asio::yield_context yield, uint32_t seq) const;
};

Expand Down
Loading
Loading