mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
* XRPLF/develop: (81 commits) ci: Only publish docs in public repos (6687) chore: Enable remaining clang-tidy `performance` checks (6648) refactor: Address PR comments after the modularisation PRs (6389) chore: Fix clang-tidy header filter (6686) ci: [DEPENDABOT] bump actions/deploy-pages from 4.0.5 to 5.0.0 (6684) ci: [DEPENDABOT] bump codecov/codecov-action from 5.5.3 to 6.0.0 (6685) fix: Guard Coro::resume() against completed coroutines (6608) refactor: Split LoanInvariant into LoanBrokerInvariant and LoanInvariant (6674) ci: Don't publish docs on release branches (6673) refactor: Make function naming in ServiceRegistry consistent (6390) chore: Shorten job names to stay within Linux 15-char thread limit (6669) fix: Improve loan invariant message (6668) ci: Upload artifacts only in public repositories (6670) ci: Add conflicting-pr workflow (6656) chore: Add more AI tools to .gitignore (6658) chore: Show warning message if user may need to connect to VPN (6619) feat: Add placeholder amendment for assorted bug fixes (6652) chore: Update sqlite3->3.51.0, protobuf->6.33.5, openssl->3.6.1, grpc->1.78.1 (6653) refactor: Modularise ledger (6536) chore: Use unpatched version of soci (6649) ...
Basics
Utility functions and classes.
ripple/basic should contain no dependencies on other modules.
Choosing a rippled container.
-
std::vector- For ordered containers with most insertions or erases at the end.
-
std::deque- For ordered containers with most insertions or erases at the start or end.
-
std::list- For ordered containers with inserts and erases to the middle.
- For containers with iterators stable over insert and erase.
- Generally slower and bigger than
std::vectororstd::dequeexcept for those cases.
-
std::set- For sorted containers.
-
xrpl::hash_set- Where inserts and contains need to be O(1).
- For "small" sets,
std::setmight be faster and smaller.
-
xrpl::hardened_hash_set- For data sets where the key could be manipulated by an attacker in an attempt to mount an algorithmic complexity attack: see http://en.wikipedia.org/wiki/Algorithmic_complexity_attack
The following container is deprecated
std::unordered_set- Use
xrpl::hash_setinstead, which uses a better hashing algorithm. - Or use
xrpl::hardened_hash_setto prevent algorithmic complexity attacks.