mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-03 17:35:51 +00:00
Compare commits
59 Commits
tapanito/l
...
bthomee/pr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1de08cd26 | ||
|
|
529cce5f1a | ||
|
|
520dafa13a | ||
|
|
6012d6fbb6 | ||
|
|
bb12fec302 | ||
|
|
a830081ede | ||
|
|
f478467904 | ||
|
|
91e1147cec | ||
|
|
0e7b1a29d9 | ||
|
|
37742ebd85 | ||
|
|
76593e00b6 | ||
|
|
e4a38fa11c | ||
|
|
ccc0a45858 | ||
|
|
1125b25556 | ||
|
|
447dbf5e62 | ||
|
|
4d3427e19c | ||
|
|
3cf90aaf5f | ||
|
|
c267000b32 | ||
|
|
a930e82684 | ||
|
|
3b8c372075 | ||
|
|
5467d3cbec | ||
|
|
9c9362ae5a | ||
|
|
a50fbcce01 | ||
|
|
9844a53404 | ||
|
|
b915e0cb4b | ||
|
|
9d40f42500 | ||
|
|
8985e8fce9 | ||
|
|
6606676aeb | ||
|
|
5fefc85d9b | ||
|
|
df3df54806 | ||
|
|
5ae0560829 | ||
|
|
b12eff90cb | ||
|
|
da7558a2e4 | ||
|
|
c301a86e8d | ||
|
|
88361aa9ed | ||
|
|
780963d5db | ||
|
|
2977cbb411 | ||
|
|
a33ae199d9 | ||
|
|
62f15223aa | ||
|
|
2faa453ea7 | ||
|
|
11d29572eb | ||
|
|
3c020b8827 | ||
|
|
1aec231cff | ||
|
|
0970c52735 | ||
|
|
69194f97d5 | ||
|
|
8725e4c0f9 | ||
|
|
951eeb65f3 | ||
|
|
343be83572 | ||
|
|
0cbd52b939 | ||
|
|
66c726556d | ||
|
|
8e93e204c7 | ||
|
|
a9a99ebad1 | ||
|
|
95a8d84f1f | ||
|
|
5a2004332b | ||
|
|
9a56a5b788 | ||
|
|
605c8bd377 | ||
|
|
900131d09f | ||
|
|
01bdb87b39 | ||
|
|
274a7303ff |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -111,3 +111,6 @@ bld.rippled/
|
||||
|
||||
# Suggested in-tree build directory
|
||||
/.build*/
|
||||
|
||||
# Locally patched Conan recipes
|
||||
external/conan-center-index/
|
||||
|
||||
24
BUILD.md
24
BUILD.md
@@ -142,18 +142,23 @@ locally:
|
||||
|
||||
```bash
|
||||
cd external
|
||||
mkdir -p conan-center-index
|
||||
cd conan-center-index
|
||||
git init
|
||||
git remote add origin git@github.com:XRPLF/conan-center-index.git
|
||||
git sparse-checkout init
|
||||
git sparse-checkout set recipes/ed25519
|
||||
git sparse-checkout set recipes/grpc
|
||||
git sparse-checkout add recipes/snappy
|
||||
git sparse-checkout add recipes/soci
|
||||
git fetch origin master
|
||||
git checkout master
|
||||
conan export --version 2015.03 recipes/ed25519/all
|
||||
conan export --version 1.1.10 recipes/snappy/all
|
||||
conan export --version 4.0.3 recipes/soci/all
|
||||
rm -rf .git
|
||||
cd ../..
|
||||
conan export --version 2015.03 external/conan-center-index/recipes/ed25519/all
|
||||
conan export --version 1.72.0 external/conan-center-index/recipes/grpc/all
|
||||
conan export --version 1.1.10 external/conan-center-index/recipes/snappy/all
|
||||
conan export --version 4.0.3 external/conan-center-index/recipes/soci/all
|
||||
```
|
||||
|
||||
In the case we switch to a newer version of a dependency that still requires a
|
||||
@@ -383,19 +388,6 @@ tools.build:cxxflags=['-DBOOST_ASIO_DISABLE_CONCEPTS']
|
||||
`--settings build_type=$BUILD_TYPE` or in the profile itself,
|
||||
under the section `[settings]` with the key `build_type`.
|
||||
|
||||
If you are using a Microsoft Visual C++ compiler,
|
||||
then you will need to ensure consistency between the `build_type` setting
|
||||
and the `compiler.runtime` setting.
|
||||
|
||||
When `build_type` is `Release`, `compiler.runtime` should be `MT`.
|
||||
|
||||
When `build_type` is `Debug`, `compiler.runtime` should be `MTd`.
|
||||
|
||||
```
|
||||
conan install .. --output-folder . --build missing --settings build_type=Release --settings compiler.runtime=MT
|
||||
conan install .. --output-folder . --build missing --settings build_type=Debug --settings compiler.runtime=MTd
|
||||
```
|
||||
|
||||
3. Configure CMake and pass the toolchain file generated by Conan, located at
|
||||
`$OUTPUT_FOLDER/build/generators/conan_toolchain.cmake`.
|
||||
|
||||
|
||||
18
conan.lock
18
conan.lock
@@ -8,7 +8,7 @@
|
||||
"snappy/1.1.10#968fef506ff261592ec30c574d4a7809%1756234314.246",
|
||||
"rocksdb/10.5.1#4a197eca381a3e5ae8adf8cffa5aacd0%1762797952.535",
|
||||
"re2/20230301#ca3b241baec15bd31ea9187150e0b333%1764175362.029",
|
||||
"protobuf/3.21.12#44ee56c0a6eea0c19aeeaca680370b88%1764175361.456",
|
||||
"protobuf/6.32.1#f481fd276fc23a33b85a3ed1e898b693%1759134873.45",
|
||||
"openssl/3.5.4#a1d5835cc6ed5c5b8f3cd5b9b5d24205%1760106486.594",
|
||||
"nudb/2.0.9#fb8dfd1a5557f5e0528114c2da17721e%1763150366.909",
|
||||
"lz4/1.10.0#59fc63cac7f10fbe8e05c7e62c2f3504%1756234228.999",
|
||||
@@ -16,19 +16,19 @@
|
||||
"libbacktrace/cci.20210118#a7691bfccd8caaf66309df196790a5a1%1756230911.03",
|
||||
"libarchive/3.8.1#ffee18995c706e02bf96e7a2f7042e0d%1764175360.142",
|
||||
"jemalloc/5.3.0#e951da9cf599e956cebc117880d2d9f8%1729241615.244",
|
||||
"grpc/1.50.1#02291451d1e17200293a409410d1c4e1%1756234248.958",
|
||||
"ed25519/2015.03#17c1f1910e769f368025267a53c23c13%1764259445.491",
|
||||
"grpc/1.72.0#f244a57bff01e708c55a1100b12e1589%1763158050.628",
|
||||
"ed25519/2015.03#ae761bdc52730a843f0809bdf6c1b1f6%1764270189.893",
|
||||
"doctest/2.4.12#eb9fb352fb2fdfc8abb17ec270945165%1762797941.757",
|
||||
"date/3.0.4#862e11e80030356b53c2c38599ceb32b%1763584497.32",
|
||||
"c-ares/1.34.5#5581c2b62a608b40bb85d965ab3ec7c8%1764175359.429",
|
||||
"bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321%1764175359.429",
|
||||
"boost/1.88.0#8852c0b72ce8271fb8ff7c53456d4983%1756223752.326",
|
||||
"abseil/20230802.1#90ba607d4ee8fb5fb157c3db540671fc%1764175359.429"
|
||||
"abseil/20250127.0#9e8e8cfc89a1324139fc0ee3bd4d8c8c%1753819045.301"
|
||||
],
|
||||
"build_requires": [
|
||||
"zlib/1.3.1#b8bc2603263cf7eccbd6e17e66b0ed76%1756234269.497",
|
||||
"strawberryperl/5.32.1.1#707032463aa0620fa17ec0d887f5fe41%1756234281.733",
|
||||
"protobuf/3.21.12#44ee56c0a6eea0c19aeeaca680370b88%1764175361.456",
|
||||
"protobuf/6.32.1#f481fd276fc23a33b85a3ed1e898b693%1759134873.45",
|
||||
"nasm/2.16.01#31e26f2ee3c4346ecd347911bd126904%1756234232.901",
|
||||
"msys2/cci.latest#5b73b10144f73cc5bfe0572ed9be39e1%1751977009.857",
|
||||
"m4/1.4.19#70dc8bbb33e981d119d2acc0175cf381%1763158052.846",
|
||||
@@ -36,13 +36,13 @@
|
||||
"cmake/3.31.10#313d16a1aa16bbdb2ca0792467214b76%1764175359.429",
|
||||
"b2/5.3.3#107c15377719889654eb9a162a673975%1756234226.28",
|
||||
"automake/1.16.5#b91b7c384c3deaa9d535be02da14d04f%1755524470.56",
|
||||
"autoconf/2.71#51077f068e61700d65bb05541ea1e4b0%1731054366.86"
|
||||
"autoconf/2.71#51077f068e61700d65bb05541ea1e4b0%1731054366.86",
|
||||
"abseil/20250127.0#9e8e8cfc89a1324139fc0ee3bd4d8c8c%1753819045.301"
|
||||
],
|
||||
"python_requires": [],
|
||||
"overrides": {
|
||||
"protobuf/3.21.12": [
|
||||
null,
|
||||
"protobuf/3.21.12"
|
||||
"protobuf/5.27.0": [
|
||||
"protobuf/6.32.1"
|
||||
],
|
||||
"lz4/1.9.4": [
|
||||
"lz4/1.10.0"
|
||||
|
||||
@@ -20,12 +20,6 @@ compiler.libcxx={{detect_api.detect_libcxx(compiler, version, compiler_exe)}}
|
||||
{% endif %}
|
||||
|
||||
[conf]
|
||||
{% if compiler == "clang" and compiler_version >= 19 %}
|
||||
grpc/1.50.1:tools.build:cxxflags+=['-Wno-missing-template-arg-list-after-template-kw']
|
||||
{% endif %}
|
||||
{% if compiler == "apple-clang" and compiler_version >= 17 %}
|
||||
grpc/1.50.1:tools.build:cxxflags+=['-Wno-missing-template-arg-list-after-template-kw']
|
||||
{% endif %}
|
||||
{% if compiler == "gcc" and compiler_version < 13 %}
|
||||
tools.build:cxxflags+=['-Wno-restrict']
|
||||
{% endif %}
|
||||
|
||||
16
conanfile.py
16
conanfile.py
@@ -29,7 +29,7 @@ class Xrpl(ConanFile):
|
||||
|
||||
requires = [
|
||||
"ed25519/2015.03",
|
||||
"grpc/1.50.1",
|
||||
"grpc/1.72.0",
|
||||
"libarchive/3.8.1",
|
||||
"nudb/2.0.9",
|
||||
"openssl/3.5.4",
|
||||
@@ -42,7 +42,7 @@ class Xrpl(ConanFile):
|
||||
]
|
||||
|
||||
tool_requires = [
|
||||
"protobuf/3.21.12",
|
||||
"protobuf/6.32.1",
|
||||
]
|
||||
|
||||
default_options = {
|
||||
@@ -59,6 +59,16 @@ class Xrpl(ConanFile):
|
||||
"date/*:header_only": True,
|
||||
"grpc/*:shared": False,
|
||||
"grpc/*:secure": True,
|
||||
"grpc/*:codegen": True,
|
||||
"grpc/*:cpp_plugin": True,
|
||||
"grpc/*:csharp_ext": False,
|
||||
"grpc/*:csharp_plugin": False,
|
||||
"grpc/*:node_plugin": False,
|
||||
"grpc/*:objective_c_plugin": False,
|
||||
"grpc/*:php_plugin": False,
|
||||
"grpc/*:python_plugin": False,
|
||||
"grpc/*:ruby_plugin": False,
|
||||
"grpc/*:otel_plugin": False,
|
||||
"libarchive/*:shared": False,
|
||||
"libarchive/*:with_acl": False,
|
||||
"libarchive/*:with_bzip2": False,
|
||||
@@ -115,7 +125,7 @@ class Xrpl(ConanFile):
|
||||
self.requires("boost/1.88.0", force=True, **transitive_headers_opt)
|
||||
self.requires("date/3.0.4", **transitive_headers_opt)
|
||||
self.requires("lz4/1.10.0", force=True)
|
||||
self.requires("protobuf/3.21.12", force=True)
|
||||
self.requires("protobuf/6.32.1", force=True)
|
||||
self.requires("sqlite3/3.49.1", force=True)
|
||||
if self.options.jemalloc:
|
||||
self.requires("jemalloc/5.3.0")
|
||||
|
||||
@@ -1271,8 +1271,7 @@ protected:
|
||||
verifyLoanStatus,
|
||||
issuer,
|
||||
lender,
|
||||
borrower,
|
||||
PaymentParameters{.showStepBalances = true});
|
||||
borrower);
|
||||
}
|
||||
|
||||
/** Runs through the complete lifecycle of a loan
|
||||
@@ -7194,15 +7193,15 @@ class LoanArbitrary_test : public LoanBatch_test
|
||||
.vaultDeposit = 10000,
|
||||
.debtMax = 0,
|
||||
.coverRateMin = TenthBips32{0},
|
||||
.managementFeeRate = TenthBips16{0},
|
||||
// .managementFeeRate = TenthBips16{5919},
|
||||
.coverRateLiquidation = TenthBips32{0}};
|
||||
LoanParameters const loanParams{
|
||||
.account = Account("lender"),
|
||||
.counter = Account("borrower"),
|
||||
.principalRequest = Number{200000, -6},
|
||||
.interest = TenthBips32{50000},
|
||||
.payTotal = 2,
|
||||
.payInterval = 200};
|
||||
.principalRequest = Number{10000, 0},
|
||||
// .interest = TenthBips32{0},
|
||||
// .payTotal = 5816,
|
||||
.payInterval = 150};
|
||||
|
||||
runLoan(AssetType::XRP, brokerParams, loanParams);
|
||||
}
|
||||
|
||||
@@ -644,7 +644,7 @@ MPTTester::operator[](std::string const& name) const
|
||||
}
|
||||
|
||||
PrettyAmount
|
||||
MPTTester::operator()(std::int64_t amount) const
|
||||
MPTTester::operator()(std::uint64_t amount) const
|
||||
{
|
||||
return MPT("", issuanceID())(amount);
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
operator[](std::string const& name) const;
|
||||
|
||||
PrettyAmount
|
||||
operator()(std::int64_t amount) const;
|
||||
operator()(std::uint64_t amount) const;
|
||||
|
||||
operator Asset() const;
|
||||
|
||||
|
||||
@@ -547,14 +547,6 @@ tryOverpayment(
|
||||
|
||||
auto const deltas = rounded - newRounded;
|
||||
|
||||
// The change in loan management fee is equal to the change between the old
|
||||
// and the new outstanding management fees
|
||||
XRPL_ASSERT_PARTS(
|
||||
deltas.managementFee ==
|
||||
rounded.managementFeeDue - managementFeeOutstanding,
|
||||
"ripple::detail::tryOverpayment",
|
||||
"no fee change");
|
||||
|
||||
auto const hypotheticalValueOutstanding =
|
||||
rounded.valueOutstanding - deltas.principal;
|
||||
|
||||
@@ -569,6 +561,7 @@ tryOverpayment(
|
||||
"the loan. Ignore the overpayment";
|
||||
return Unexpected(tesSUCCESS);
|
||||
}
|
||||
|
||||
return LoanPaymentParts{
|
||||
// Principal paid is the reduction in principal outstanding
|
||||
.principalPaid = deltas.principal,
|
||||
@@ -683,6 +676,12 @@ doOverpayment(
|
||||
"ripple::detail::doOverpayment",
|
||||
"principal change agrees");
|
||||
|
||||
XRPL_ASSERT_PARTS(
|
||||
overpaymentComponents.trackedManagementFeeDelta ==
|
||||
managementFeeOutstandingProxy - managementFeeOutstanding,
|
||||
"ripple::detail::doOverpayment",
|
||||
"no fee change");
|
||||
|
||||
// I'm not 100% sure the following asserts are correct. If in doubt, and
|
||||
// everything else works, remove any that cause trouble.
|
||||
|
||||
@@ -713,6 +712,13 @@ doOverpayment(
|
||||
"ripple::detail::doOverpayment",
|
||||
"principal payment matches");
|
||||
|
||||
XRPL_ASSERT_PARTS(
|
||||
loanPaymentParts.feePaid ==
|
||||
overpaymentComponents.untrackedManagementFee +
|
||||
overpaymentComponents.trackedManagementFeeDelta,
|
||||
"ripple::detail::doOverpayment",
|
||||
"fee payment matches");
|
||||
|
||||
// All validations passed, so update the proxy objects (which will
|
||||
// modify the actual Loan ledger object)
|
||||
totalValueOutstandingProxy = totalValueOutstanding;
|
||||
|
||||
@@ -305,13 +305,7 @@ LoanPay::doApply()
|
||||
// change will be discarded.
|
||||
if (loanSle->isFlag(lsfLoanImpaired))
|
||||
{
|
||||
if (auto const ret =
|
||||
LoanManage::unimpairLoan(view, loanSle, vaultSle, j_);
|
||||
ret != tesSUCCESS)
|
||||
{
|
||||
JLOG(j_.fatal()) << "Failed to unimpair loan before payment.";
|
||||
return ret; // LCOV_EXCL_LINE
|
||||
}
|
||||
LoanManage::unimpairLoan(view, loanSle, vaultSle, j_);
|
||||
}
|
||||
|
||||
LoanPaymentType const paymentType = [&tx]() {
|
||||
|
||||
Reference in New Issue
Block a user