Commit Graph

14231 Commits

Author SHA1 Message Date
Nicholas Dudfield
ca7872fa2d test: cover overlay lifecycle and bound upgrade responses
Exercise real ConnectAttempt refusal, TLS handshake failure and timeout, HTTP rejection and timeout, and explicit stop. Cover PeerImp stop and graceful TLS shutdown with real loopback TLS streams, peerfinder slots, and bounded io_context runs.

Rearm the ConnectAttempt deadline before reading the HTTP upgrade response. This missing deadline predates Boost port #5570; the new stalled-response regression targets it. The real 15-second handshake and response timers run concurrently.

Formatting and whitespace checks pass. Build, runtime control, and coverage measurement are delegated to Claude using the existing release build.

(cherry picked from commit 28b8bc1a217e60284666417c9a45525bb14f86bd)
2026-09-16 13:29:42 +07:00
Nicholas Dudfield
0a71799738 fix: reset http fallback state and enforce tls deadlines
Clear the prior host error before arming a new deadline. On timeout, close the underlying transport instead of waiting for graceful TLS shutdown, and preserve timed_out through header completion.

Add bounded regression cases for fallback after connection refusal, a silent TLS response, and a stalled TLS handshake. Formatting and whitespace checks pass; runtime validation is delegated to Claude at the operator request.

(cherry picked from commit 750fa35b872747fcd6cf5957af3466464a02224c)
2026-09-16 13:29:42 +07:00
Nicholas Dudfield
393e08fcf7 style: apply CI's clang-format and levelization patches for the new suites 2026-09-16 13:23:14 +07:00
Nicholas Dudfield
af3f2914d4 test: cover the Boost 1.87 asio port in StatsDCollector, ResolverAsio and Spawn
codecov/patch on #812 flagged the ported plumbing as uncovered because
nothing had ever tested it: StatsDCollector (0%), ResolverAsio (26%),
Spawn.h (50%). Three bounded suites:

- ripple.insight.StatsDCollector: a loopback UDP sink; one of each metric
  plus a hook; asserts the datagrams after the 1 s flush tick (dispatch +
  bind_executor posts, expires_after tick, async_send) and that teardown
  (cancel() in try/catch, work guard, thread join) is prompt.
- ripple.basics.ResolverAsio: numeric host (results_type iteration), a
  batch with an unparseable name (skipped without a callback, do_work
  chaining), an unresolvable .invalid name (error -> empty list), stop()
  with 200 names pending, stop_async() + stop().
- ripple.server.Spawn: the strand and plain-executor overloads, a real
  suspension on the strand, and both branches of kPROPAGATE_EXCEPTIONS
  (std::exception and a non-std throw escape io_context::run()).
2026-09-16 13:18:59 +07:00
Nicholas Dudfield
4ccb6eb450 style: clang-format files changed since origin/dev 2026-09-16 12:32:46 +07:00
Nicholas Dudfield
1de02fd043 fix: brace-initialise HTTPClient::Query for clang
Query is an aggregate; make_shared<Query>(a, b, c) needs C++20 parenthesised
aggregate initialisation, which GCC 11 accepts and CI's clang rejects
('no matching constructor'). Same code upstream, which builds with a newer
clang.
2026-09-16 12:32:39 +07:00
Nicholas Dudfield
3907c33ed7 fix: arm the HTTPClient deadline on the success path
XRPLF #5570 rewrote expires_from_now(mTimeout, ec) as try/catch around
expires_after() and moved the async_wait into the catch block, so the
deadline was only registered when arming it threw. A request to a server
that never answers therefore never timed out: the header read stayed
pending and io_context::run() never returned. Caught by #677's
ripple.net.HTTPClient 'Socket cleanup after timeout', which hung the full
unit run deterministically on both the 1.88 and 1.91 builds (strace: no
timer pending on the test's reactor, handleDeadline never ran). Upstream
has the same code and no test for it.
2026-09-16 12:23:27 +07:00
Nicholas Dudfield
6a32ba2cca test: guard beast expired-stream executor completion
Exercise raw stream and composed HTTP reads and writes after expiry, both on and outside a TS executor strand. Check one asynchronous timeout completion on the bound strand with zero bytes.

Covers boostorg/beast issues #2925 and #2941 without network traffic, sleeps, or a dependency patch. The actual suite passes 8 cases and 40 checks on Boost 1.91 with GCC 11 and Apple Clang; stock Boost 1.86 fails with bad_executor.

(cherry picked from commit cfaf019903d836c2dab3b396324e758281b3c510)
2026-09-16 10:45:39 +07:00
Nicholas Dudfield
db91bdda03 fix: boost 1.91 dropped the boost::system component
boost 1.91's conan recipe makes Boost.System header-only and no longer
exports a boost::system component. Two references broke conan graph
generation: nudb 2.0.8's recipe (bump to 2.0.9, whose recipe requires
boost::thread + boost::headers, matching XRPLF at boost 1.91) and our
cmake/deps/Boost.cmake link list (drop Boost::system, as XRPLF did in
their 1.90 bump). nudb is pulled from conancenter (not the unused vendored
external/nudb), so the version string is the whole fix.
2026-09-16 10:09:09 +07:00
Nicholas Dudfield
2c0d679b10 chore: bump boost 1.88.0 -> 1.91.0 (match XRPLF develop/3.2+)
XRPLF's 1.88->1.90->1.91 path is version-string only for the parts that
apply to xahaud; the sole code change was 1.90 dropping the now-header-only
Boost::system from the link list, which is cleanup — the target still
exists at 1.91, so ripple_boost is left as-is. Other deps in XRPLF's bump
commits (protobuf/sqlite/zlib/jemalloc/libarchive) are their versions, not
ours, and are not touched.
2026-09-16 10:02:42 +07:00
Nicholas Dudfield
fc9cbdf60a fix: rename the last io_service use in RPCSub::sendThread 2026-09-16 09:35:07 +07:00
Nicholas Dudfield
6e42617c3a fix: boost 1.87 removed the waitable_timer getters and expires_from_now
ValidatorSite: timer_.expires_at() (getter) -> timer_.expiry(), as in
XRPLF develop. Tests: expires_from_now(d) -> expires_after(d).
2026-09-16 09:22:49 +07:00
Nicholas Dudfield
b8c80c51db fix: resolve boost 1.88 cherry-pick conflicts, drop remaining io_service uses
Resolves the 28 conflicts from cherry-picking XRPLF/rippled 1506e65558
(#5570) onto origin/dev:

- io_service -> io_context everywhere upstream renamed it, keeping the
  xahaud-only code around those lines (UDP door in ServerImpl, sticky
  endpoint selection in WorkBase with bind_executor instead of
  strand.wrap, useSqLiteStore in PeerfinderManager, RPCSub after #677).
- src/xrpld/rpc/detail/RPCSub.cpp (upstream path) dropped; xahaud's copy
  lives at src/xrpld/net/detail/RPCSub.cpp and its local io_service is
  renamed there.
- conanfile.py: boost/1.88.0 in xahaud's override form, without_cobalt on
  gcc/clang; boost::boost kept.
- Boost 1.88 removes the io_service typedef and address::from_string and
  makes Boost.Process v2 the default: the #677 tests move to io_context,
  executor_work_guard and make_address; Main.cpp includes the v1 process
  headers it already uses instead of the umbrella.

Not yet compiled.
2026-09-16 09:08:21 +07:00
Alex Kremer
8bd015d8d8 chore: cherry-pick xrplf #5570 (boost 1.88) with conflicts unresolved
Raw result of cherry-picking XRPLF/rippled 1506e65558 onto origin/dev
c208a40ce8: 78 files applied clean, 28 in conflict (36 hunks), conflict
markers left in place so the merge is visible. Resolution follows in the
next commit. src/xrpld/rpc/detail/RPCSub.cpp is upstream's copy of a file
xahaud moved to src/xrpld/net/detail/RPCSub.cpp (delete/modify).

(cherry picked from commit 1506e65558818ea73a2233d2a55c1d1441d5fb10)
2026-09-16 09:04:10 +07:00
tequ
c208a40ce8 remove WASM: $COUNTER from SetHook_wasm.h (#804) 2026-09-09 15:31:11 +10:00
tequ
401a35957d retire fixXahauV1, fixXahauV2 Amendments (#722) 2026-09-09 13:00:24 +10:00
Niq Dudfield
65ff61d518 fix: fail fast when amendment blocked instead of degraded state (#707) 2026-09-08 13:39:45 +10:00
Richard Holland
6191c1e09d Onchain manifests (#779) 2026-09-07 13:19:25 +10:00
tequ
f1a3a775a1 Add optional Hooks data to account_info response (#789) 2026-09-02 17:22:53 +10:00
tequ
c1dabe5576 Fix comments (#768) 2026-09-01 14:18:28 +10:00
Niq Dudfield
c6d5b345eb fix: subscription webhook delivery stalling on HTTP errors (#677) 2026-08-27 12:13:21 +10:00
Richard Holland
bb244ef772 put release builds into a candidate folder to prevent auto-update scripts running before smoke tests (#761) 2026.6.21-release+3350 2026-06-21 12:12:43 +10:00
Richard Holland
639ea34377 Fixhookmap (#756) 2026-06-16 17:06:25 +10:00
tequ
089c0dc3fe Fix ammLPHolds logic to include escrowed cases (#757) 2026-06-16 15:26:29 +10:00
tequ
78167e09c0 change sfHookOn of ltHookDefinition to soeOptional for HookOnV2 (#755) 2026-06-16 13:58:53 +10:00
tequ
607a7fdf98 Change AMM to Supported::no (#758) 2026-06-16 13:56:58 +10:00
tequ
c55420bcd8 Fix duplicate and incorrect fields in server_definitions (#753) 2026-05-27 07:58:13 +10:00
tequ
cb91b4e88e Restore pre-reserved tem codes (#754) 2026-05-27 07:57:55 +10:00
tequ
90333b6fd0 Fix HookAPI Expected and Refactor Enum classes (#729) 2026-05-26 11:02:17 +10:00
tequ
7f9a9364b0 fix: Ensures canonical order for PriceDataSeries upon PriceOracle creation (#5485) (#744) 2026-05-25 11:34:24 +10:00
tequ
706d31f01d Update .git-blame-ignore-revs (#746) 2026-05-25 11:28:56 +10:00
tequ
083e9e4315 Generate hook extern declarations with C linkage (#750) 2026-05-25 11:27:21 +10:00
tequ
b9e0c56def Guard depth 32 (#653) 2026-05-25 11:10:49 +10:00
tequ
663ed4edb8 Named Hook (#718) 2026-05-19 12:00:25 +10:00
tequ
8422758d4d chore: Improve codecov coverage reporting (#4977) (#745) 2026-05-18 12:21:47 +10:00
tequ
586c78e812 fix: Replace badCurrency() checks with isBadCurrency() for improved clarity (#742) 2026-05-18 11:57:25 +10:00
Niq Dudfield
9b50b68d39 perf(ledger): optimize catalogue loading memory usage and performance (#548) 2026-05-06 17:29:44 +10:00
tequ
5e8d26f67a refactor: Calculate numFeatures automatically (#5324) (#739)
Co-authored-by: Ed Hennis <ed@ripple.com>
2026-04-30 18:17:50 +10:00
tequ
a6186d7855 IOURewardClaim (#500) 2026-04-30 15:27:51 +10:00
tequ
b449599408 Add --definitions CLI flag to output static server definitions without starting server (#708) 2026-04-30 12:42:42 +10:00
tequ
9d4e507675 Treat suspicious gcov hit counts as coverage warnings (#737) 2026-04-29 17:06:44 +10:00
tequ
49fd0c33b5 fixIOULockedBalanceInvariant Amendment (#732) 2026-04-29 17:05:18 +10:00
tequ
0ffb6e8c21 Replace vendored magic_enum header with Conan package dependency (#727) 2026-04-29 17:00:25 +10:00
tequ
61138058a6 Delete unused sfHookDefinition (#715) 2026-04-29 16:45:35 +10:00
tequ
8dd17973d0 Add hook header ls_flags.h and tx_flags.h (#717) 2026-04-29 16:41:52 +10:00
Fomo
dd9e6053a0 fix: Expand the pathing tables and lower weight on sabbxd, also return up … (#723) 2026-04-29 14:28:00 +10:00
tequ
8c1be39f70 Fix LedgerNameSpace to ensure uniqueness (#710) 2026-04-29 12:01:57 +10:00
tequ
61d1d6e441 Add test for rejected Remit to AMM account (#698) 2026-04-29 11:20:13 +10:00
tequ
788ba43266 Refactor getFieldU16(sfTransactionType) with getTxnType() (#711) 2026-04-29 11:17:49 +10:00
tequ
55710c4baf Disallow setting a AMM account as Issuer/Destination/Inform (#709) 2026-04-29 11:00:25 +10:00