Commit Graph

13400 Commits

Author SHA1 Message Date
Vito
3ca6dda72d improves expired squelch deletion 2025-07-30 18:22:10 +02:00
Vito
762fd3b6a5 improves code readability 2025-07-30 18:22:09 +02:00
Vito
f2b13797d1 adds documentation and improves squelching comments 2025-07-30 18:22:09 +02:00
Vito
4be9e6b284 removes redundant checks before erasing elements 2025-07-30 18:22:08 +02:00
Vito
4ab1e1e163 extends enhanced squelching to squelch a validator squelched by majority of peers 2025-07-30 18:22:08 +02:00
Vito
2ec5add603 adds squelchStore 2025-07-30 18:22:06 +02:00
Vito
8087785204 changes selection parameters and number of untrusted slots
Simulation results revealed that by requiring a minimum number of peers to send a message, valdiations will stop propagating, as the servers that are directly connected to peers will receive a unique message from only a single peer, the validator. Therefore, they will fail to select a slot.
Furthermore, by increasing untrusted slots to 30 we guarantee that some validators will propagate through most of the network.
2025-07-30 18:21:23 +02:00
Vito
a9a9b9976a improves code readability 2025-07-30 18:21:22 +02:00
Vito
eb805654e0 adds logic to reset validator progress and better deletion safeguards
If the validator was idle for a short period, reset it's progress. However, if the validator was idle for a long time, delete and squelch it.
Similarly, if the validator sent a lot of unique messages, but failed to reach peering constraints, squelch it.
2025-07-30 18:21:21 +02:00
Vito
8156a70f0e removes redundant scope 2025-07-30 18:21:20 +02:00
Vito
5cba8d653e adds callback to squelchAll instead of calling slots directly 2025-07-30 18:21:19 +02:00
Vito
99b2aa3702 further improves member function and attribute names 2025-07-30 18:21:18 +02:00
Vito
dcb832ecf9 improves code readability 2025-07-30 18:21:18 +02:00
Vito
5e6189d656 fixes windows tests 2025-07-30 18:21:17 +02:00
Vito
2c47fbf6c8 fixes code formatting 2025-07-30 18:21:16 +02:00
Vito
0ef0826466 decouples tests from squelching implementation 2025-07-30 18:21:16 +02:00
Vito
4960ba0f8c improves code readability 2025-07-30 18:21:15 +02:00
Vito
d22a2b82a7 removes unused test parameters 2025-07-30 18:21:14 +02:00
Vito
ea8763060c removes unused imports 2025-07-30 18:21:13 +02:00
Vito
4e9e245a03 removes unused clock 2025-07-30 18:21:13 +02:00
Vito
450129cc16 improves code readabiliy 2025-07-30 18:21:12 +02:00
Vito
8ee5d129b2 refactors squelching to use instanced clock instead of a static clock 2025-07-30 18:21:11 +02:00
Vito
529687ea73 removes duplicate untrusted slot check 2025-07-30 18:21:11 +02:00
Vito Tumas
a57fa169a8 Update src/xrpld/overlay/detail/OverlayImpl.h
Co-authored-by: Valentin Balaschenko <13349202+vlntb@users.noreply.github.com>
2025-07-30 18:21:10 +02:00
Vito
adfbb48ac6 fixes unittests for windows 2025-07-30 18:21:09 +02:00
Vito
ae38c2a2ce removes member functions from Slots used only for testing, and moves them to tests 2025-07-30 18:21:09 +02:00
Vito
15b43bda0d adds enhanced squelching tests 2025-07-30 18:21:08 +02:00
Vito
0f2fec66dc adds methods to print slot details from command 2025-07-30 18:21:07 +02:00
Vito
cf4f95a9c9 feature: extend squelching to suppress untrusted validator traffic
This feature improves network efficiency by limiting message propagation from untrusted validators.

Squelching currently reduces the volume of duplicate messages from validators but does not address the volume of unique messages from untrusted validators, who may not contribute meaningfully to network progress.

This change introduces a bounded number of slots for untrusted validators, selected based on message frequency. Once selected, their duplicate messages are subject to standard squelching logic, thereby reducing overall message overhead without impacting trusted validator performance.
2025-07-30 18:21:07 +02:00
Vito
2599defe98 adds data strcutures and methods to track red validators 2025-07-30 18:21:06 +02:00
Vito
54678dc2a4 adds method to SquelchHandler to squelch all peers 2025-07-30 18:21:06 +02:00
Vito
6bbd836adc adds methods to track which peers and validators were squelched 2025-07-30 18:21:05 +02:00
Vito
48471d5a2b adds isTrusted parameter to updateSlotAndSquelch method to differentiate messages from trusted validators 2025-07-30 18:21:05 +02:00
Vito
d37e422683 adds config option for enhanced squelching 2025-07-30 18:21:04 +02:00
Bronek Kozicki
7179ce9c58 Build options cleanup (#5581)
As we no longer support old compiler versions, we are bringing back some warnings by removing no longer relevant `-Wno-...` options.
2025-07-25 15:48:22 -04:00
Bart
921aef9934 Updates Conan dependencies: Boost 1.86 (#5264) 2025-07-25 11:54:02 -04:00
Bronek Kozicki
e7a7bb83c1 VaultWithdraw destination account bugfix (#5572)
#5224 added (among other things) a `VaultWithdraw` transaction that allows setting the recipient of the withdrawn funds in the `Destination` transaction field. This technically turns this transaction into a payment, and in some respect the implementation does follow payment rules, e.g. enforcement of `lsfRequireDestTag` or `lsfDepositAuth`, or that MPT transfer has destination `MPToken`. However for IOUs, it missed verification that the destination account has a trust line to the asset issuer. Since the default behavior of `accountSendIOU` is to create this trust line (if missing), this is what `VaultWithdraw` currently does. This is incorrect, since the `Destination` might not be interested in holding the asset in question; this basically enables spammy transfers. This change, therefore, removes automatic creation of a trust line to the `Destination` account in `VaultWithdraw`.
2025-07-25 13:53:25 +00:00
Bart
5c2a3a2779 refactor: Update rocksdb (#5568)
This change updates RocksDB to its latest version. RocksDB is backward-compatible, so even though this is a major version bump, databases created with previous versions will continue to function.

The external RocksDB folder is removed, as the latest version available via Conan Center no longer needs custom patches.
2025-07-24 14:53:14 -04:00
Bronek Kozicki
b2960b9e7f Switch instrumentation workflow to use dependencies (#5607)
Before `XRPLF/ci` images, we did not have a `dependencies:` job for clang-16, so `instrumentation:` had to build its own dependencies. Now we have clang-16 Conan dependencies built in a separate job that can be used.
2025-07-24 09:20:50 -04:00
Bronek Kozicki
5713f9782a chore: Rename conan profile to default (#5599)
This change renames the `libxrpl` profile to `default` to make it more usable.
2025-07-24 10:35:47 +00:00
Chenna Keshava B S
60e340d356 Include network_id in validations and subscription stream responses (#5579)
This change includes `network_id` data in the validations and ledger subscription stream responses, as well as unit tests to validate the response fields. Fixes #4783
2025-07-23 17:53:18 +00:00
Bronek Kozicki
80d82c5b2b Add support for DomainID in MPTokenIssuance transactions (#5509)
This change adds support for `DomainID` to existing transactions `MPTokenIssuanceCreate` and `MPTokenIssuanceSet`.

In #5224 `DomainID` was added as an access control mechanism for `SingleAssetVault`. The actual implementation of this feature lies in `MPToken` and `MPTokenIssuance`, hence it makes sense to enable the use of `DomainID` also in `MPTokenIssuanceCreate` and `MPTokenIssuanceSet`, following same rules as in Vault:

* `MPTokenIssuanceCreate` and `MPTokenIssuanceSet` can only set `DomainID` if flag `MPTRequireAuth` is set.
* `MPTokenIssuanceCreate` requires that `DomainID` be a non-zero, uint256 number.
* `MPTokenIssuanceSet` allows `DomainID` to be zero (or empty) in which case it will remove `DomainID` from the `MPTokenIssuance` object.

The change is amendment-gated by `SingleAssetVault`. This is a non-breaking change because `SingleAssetVault` amendment is `Supported::no`, i.e. at this moment considered a work in progress, which cannot be enabled on the network.
2025-07-23 13:21:30 -04:00
Vlad
433eeabfa5 chore: Remove unused code after flow cross retirement (#5575)
After the `FlowCross` amendment was retired (#5562), there was still some unused code left. This change removes the remaining remnants.
2025-07-23 13:57:51 +00:00
Jingchen
faa781b71f Remove obsolete owner pays fee feature and XRPL_ABANDON stanza (#5550)
If a feature was never voted on then it is safe to remove.
2025-07-23 13:27:41 +00:00
Valentin Balaschenko
c233df720a refactor: Makes HashRouter flags more type-safe (#5371)
This change addresses the issue #5336: Refactor HashRouter flags to be more type-safe.

* Switched numeric flags to enum type.
* Updated unit tests
2025-07-23 12:03:12 +00:00
Bronek Kozicki
7ff4f79d30 Fix clang-format CI job (#5598)
For jobs running in containers, $GITHUB_WORKSPACE and ${{ github.workspace }} might not be the same directory. The actions/checkout step is supposed to checkout into `$GITHUB_WORKSPACE` and then add it to safe.directory (see instructions at https://github.com/actions/checkout), but that's apparently not happening for some container images. We can't be sure what is actually happening, so we preemptively add both directories to `safe.directory`. See also the GitHub issue opened in 2022 that still has not been resolved https://github.com/actions/runner/issues/2058.
2025-07-23 10:44:18 +00:00
Luc des Trois Maisons
60909655d3 Restructure beast::rngfill (#5563)
The current implementation of rngfill is prone to false warnings from GCC about array bounds violations. Looking at the code, the implementation naively manipulates both the bytes count and the buffer pointer directly to ensure the trailing memcpy doesn't overrun the buffer. As expressed, there is a data dependency on both fields between loop iterations.

Now, ideally, an optimizing compiler would realize that these dependencies were unnecessary and end up restructuring its intermediate representation into a functionally equivalent form with them absent. However, the point at which this occurs may be disjoint from when warning analyses are performed, potentially rendering them more difficult to
determine precisely.

In addition, it may also consume a portion of the budget the optimizer has allocated to attempting to improve a translation unit's performance. Given this is a function template which requires context-sensitive instantiation, this code would be more prone than most to being inlined, with a decrease in optimization budget corresponding to the effort the optimizer has already expended, having already optimized one or more calling functions. Thus, the scope for impacting the the ultimate quality of the code generated is elevated.

For this change, we rearrange things so that the location and contents of each memcpy can be computed independently, relying on a simple loop iteration counter as the only changing input between iterations.
2025-07-22 11:42:43 -04:00
Bronek Kozicki
03e46cd026 Remove include(default) from libxrpl profile (#5587)
Remove `include(default)` from `conan/profiles/libxrpl`. This means that we will now rely on compiler workarounds stored elsewhere e.g. in global.conf.
2025-07-21 14:03:53 +00:00
Vito Tumas
e95683a0fb refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
This change reverts the usage of boost::shared_mutex back to std::shared_mutex. The change was originally introduced as a workaround for a bug in glibc 2.28 and older versions, which could cause threads using std::shared_mutex to stall. This issue primarily affected Ubuntu 18.04 and earlier distributions, which we no longer support.
2025-07-21 13:14:22 +00:00
Jingchen
13353ae36d Fix macos runner (#5585)
This change fixes the MacOS pipeline issue by limiting GitHub to choose the existing runners, ensuring the new experimental runners are excluded until they are ready.
2025-07-21 12:22:32 +00:00