Commit Graph

14086 Commits

Author SHA1 Message Date
Pratik Mankawde
fbac9b90e3 Merge branch 'develop' into pratik/test-tsan-and-gcc14-asan 2026-03-24 12:22:19 +00:00
Pratik Mankawde
c7d41dd486 Merge branch 'pratik/test-tsan-and-gcc14-asan' of github.com:XRPLF/rippled into pratik/test-tsan-and-gcc14-asan 2026-03-24 12:22:03 +00:00
Mayukha Vadari
8b986e4ab0 refactor: Improve imports to only call the needed helpers (#6624) 2026-03-24 10:20:32 +00:00
Olek
dcfcdab14e fix: Remove superfluous view update from credentials (#6545) 2026-03-23 18:29:34 +00:00
Mayukha Vadari
e0dbe90370 refactor: Move ledger entry helper functions from View.h/View.cpp to dedicated helper files (#6453)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-23 15:39:58 +00:00
dependabot[bot]
c463d0ff06 ci: [DEPENDABOT] bump codecov/codecov-action from 5.5.2 to 5.5.3 (#6615)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 14:04:22 +00:00
Pratik Mankawde
02c9830184 fix: Add Doxygen docs and remove temporary CI filter
- Add Doxygen documentation to new methods, members, constants, and
  macros introduced by the TSAN/ASAN PR (Database::startReadThreads,
  BasicApp::DeferStart, ResourceManager::start, XRPL_SANITIZER_ACTIVE,
  coroStackSize, yieldStackSize)
- Add @note thread-safety tags where atomics were introduced
- Update Database constructor docs to reflect deferred thread startup
- Remove temporary CI filter that restricted builds to sanitizer-only
  variants (must run full matrix before merge)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 10:46:16 +00:00
Pratik Mankawde
390622f7c9 Merge branch 'develop' into pratik/test-tsan-and-gcc14-asan 2026-03-23 10:28:23 +00:00
Mayukha Vadari
be1cc48d84 fix: Assorted Oracle fixes (#6570) 2026-03-22 18:08:18 +00:00
Pratik Mankawde
6094b101b8 fix: Keep Clang sanitizers combined, only separate GCC
Clang doesn't have the 2GB shadow memory collision that GCC has,
so keep ASAN+UBSAN and TSAN+UBSAN combined for Clang-20. Only GCC-13
needs separate ASAN, TSAN, and UBSAN jobs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 16:32:35 +00:00
Pratik Mankawde
9bb2505c42 Merge branch 'develop' into pratik/test-tsan-and-gcc14-asan 2026-03-20 15:40:10 +00:00
Pratik Mankawde
2d9b5a39e8 fix: Separate ASAN+UBSAN and TSAN+UBSAN into independent CI jobs
Combined ASAN+UBSAN instrumentation inflates data sections past 2GB,
colliding with ASAN's fixed shadow memory layout at 0x7fff8000+.
Split into independent ASAN, TSAN, and UBSAN jobs per compiler to
keep each binary within the shadow memory limit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 15:39:06 +00:00
Pratik Mankawde
661ce8f79b fix: Use -mcmodel=medium for GCC ASAN in CMake (match Conan profile)
The previous commit (f13d17165a) switched the Conan profile from
-mcmodel=large to -mcmodel=medium for GCC ASAN builds, but missed
updating cmake/XrplSanitizers.cmake. The main xrpld binary was still
compiled with -mcmodel=large, inflating it to ~2.1GB with 64-bit
absolute addresses, which collided with ASAN's fixed shadow memory
layout at 0x7fff8000+.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 11:08:07 +00:00
Ayaz Salikhov
cf2eb149ee fix: Update .git-blame-ignore-revs (#6577) 2026-03-19 22:48:20 +00:00
Ayaz Salikhov
762922a07f chore: Don't allow files more than 400kb to be added to the repo (#6597) 2026-03-19 21:20:56 +00:00
Bart
fd28656ded ci: Check for signed commits in PR (#6559)
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
2026-03-19 17:38:09 +00:00
Ayaz Salikhov
9316da784a ci: Update XRPLF/actions (#6594) 2026-03-19 17:29:22 +00:00
Pratik Mankawde
2fef71f235 Merge branch 'develop' into pratik/test-tsan-and-gcc14-asan 2026-03-19 15:22:43 +00:00
Pratik Mankawde
f13d17165a fix: Switch GCC ASAN to -mcmodel=medium and reduce TSAN build parallelism
- Change -mcmodel=large to -mcmodel=medium for GCC ASAN builds. The large
  model inflates code size with 64-bit absolute addresses, pushing the
  binary past the 2GB limit where GCC's pre-compiled CRT startup code
  (crtstuff.c) can't reach data sections with 32-bit relocations.
  Medium model keeps code compact (CRT-compatible) while allowing data
  beyond 2GB.

- Add nproc_subtract=20 for TSAN builds to reduce build parallelism.
  TSAN instrumentation significantly increases per-compilation-unit memory
  usage, causing OOM on CI runners with high parallelism.

- Plumb nproc_subtract from the CI matrix through to the build workflow
  so individual configurations can control their parallelism.

- Temporarily restrict CI matrix to only the two previously-failing
  configs (gcc-13 asan-ubsan, clang-20 tsan-ubsan) to validate fixes
  without burning CI resources on passing configs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 15:22:23 +00:00
Pratik Mankawde
f2cc697cb4 fix: Suppress Ledger::setValidated data race in TSAN
Add suppression for pre-existing data race on LedgerHeader::validated
(plain bool mutable) between LedgerMaster worker thread and test code.
The flag is monotonic (false→true only), so the race is benign but
technically UB. Proper fix (atomic<bool>) deferred to a follow-up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 14:03:07 +00:00
Pratik Mankawde
7d975cae2f fix: Add LedgerReplay deadlock suppression and fix GCC ASAN linker error
- Suppress lock-order-inversion in LedgerReplayTask/LedgerDeltaAcquire
  (28 TSAN warnings from pre-existing lock ordering issue).
- Add tools.build:cflags to Conan sanitizer profiles so that C
  dependencies (ed25519) are compiled with -mcmodel=large and sanitizer
  flags, fixing the GOTPCREL relocation overflow on GCC ASAN builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 14:00:42 +00:00
Pratik Mankawde
2117959900 fix: Resolve CI levelization and rename check failures
- Revert yield_to.h to use inline preprocessor blocks instead of
  including sanitizers.h, avoiding a levelization loop between
  xrpl.basics and xrpl.beast.
- Restructure XRPL_SANITIZER_ACTIVE fallback in sanitizers.h to avoid
  the #ifndef/#define pattern that the rename check misdetects as an
  include guard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 12:59:54 +00:00
Pratik Mankawde
9dd2ca1e4a fix: Address code review findings for TSAN/ASAN PR
- Fix BasicApp::startIOThreads() member corruption: replace
  while(numberOfThreads_--) with a for loop to preserve the member value.
- Fix Coro.ipp non-sanitizer stack size: increase default from 1MB to 2MB
  to match yield_to.h and prevent stack overflows in deep call chains.
- Remove stale "TSAN deactivated" comment and dead activate_tsan variable
  from CI matrix generator.
- Clarify Application.cpp setup() comment to distinguish io_context threads
  from subsystem-specific threads.
- Use explicit load(std::memory_order_relaxed) at all SHAMap::ledgerSeq_
  read sites for consistency with the atomic store.
- Extract sanitizer detection into XRPL_SANITIZER_ACTIVE macro in
  sanitizers.h, replacing duplicated preprocessor blocks in Coro.ipp
  and yield_to.h.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 12:51:51 +00:00
Pratik Mankawde
9ec3f091f2 fix: Resolve TSAN-detected data races and suppress lock-order-inversion
- Make Journal::Sink::thresh_ atomic to fix data race between
  concurrent log threshold reads (hot path) and writes (RPC/startup)
- Make SHAMap::ledgerSeq_ atomic to fix data race between concurrent
  node fetch reads and ledger acquisition writes
- Suppress known lock-order-inversion between getMasterMutex() and
  RCLConsensus::mutex_ (requires larger lock-ordering redesign)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 12:29:08 +00:00
Pratik Mankawde
d2079574c7 fix: Build Boost.Context with ucontext backend for TSAN builds
TSAN cannot instrument fcontext (assembly) context switches, causing
undefined symbol errors for fiber_activation_record::current(). Add
Conan build options and CMake defines to use the ucontext backend
for TSAN, matching the existing ASAN configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 11:18:14 +00:00
Michael Legleux
6efd31229a fix: Use correct format and event for workflows for release tags (#6554) 2026-03-19 10:23:51 +00:00
Alex Kremer
12954d5392 fix: Address remaining issue after clang-tidy merge (#6582) 2026-03-18 22:41:09 +00:00
Jingchen
b1e5ba0518 feat: Add code generator for transactions and ledger entries (#6443)
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
Co-authored-by: Bart <bthomee@users.noreply.github.com>
2026-03-18 21:11:51 +00:00
Mayukha Vadari
d360e7c5b6 refactor: Rename transactor files/classes to match the tx name (#6580) 2026-03-18 19:52:07 +00:00
Ayaz Salikhov
804a351773 ci: Use external action implementation of check-pr-title (#6578) 2026-03-18 18:31:42 +00:00
Ayaz Salikhov
697fb64e8c ci: Don't check PR title for drafts (#6573) 2026-03-18 17:46:27 +00:00
Pratik Mankawde
018fe98696 fix: Add missing ByteUtilities.h include and use coroStackSize constant
- Include ByteUtilities.h in Coro.ipp so megabytes() is declared
- Use coroStackSize constant in coroutine constructor instead of
  hardcoded 1536*1024, enabling sanitizer-aware stack sizing
- Initialize local variable in PropertyStream destructor to satisfy
  clang-tidy cppcoreguidelines-init-variables

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 16:46:18 +00:00
Alex Kremer
57e4cbbcd9 refactor: Add simple clang-tidy readability checks (#6556)
This change enables the following clang-tidy checks:
-  readability-avoid-nested-conditional-operator,
-  readability-avoid-return-with-void-value,
-  readability-braces-around-statements,
-  readability-const-return-type,
-  readability-container-contains,
-  readability-container-size-empty,
-  readability-else-after-return,
-  readability-make-member-function-const,
-  readability-redundant-casting,
-  readability-redundant-inline-specifier,
-  readability-redundant-member-init,
-  readability-redundant-string-init,
-  readability-reference-to-constructed-temporary,
-  readability-static-definition
2026-03-18 16:41:49 +00:00
Pratik Mankawde
cc51d5430b Merge branch 'develop' into pratik/test-tsan-and-gcc14-asan
Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
2026-03-18 15:51:58 +00:00
Mayukha Vadari
b92a9a3053 fix: Make assorted NFT fixes (#6566)
This change:
* Removes a set of unnecessary brackets in the initialization of an `std::uint32_t`.
* Fixes a couple of incorrect flags (same value, just wrong variables - so no amendment needed).
2026-03-18 14:47:59 +00:00
Mayukha Vadari
dcaef828b4 refactor: Replace !=/== tesSuccess with using isTesSuccess (#6409)
This change replaces all instances of `<variable> != tesSUCCESS` with `!isTesSuccess(<variable>)` and `<variable> == tesSUCCESS` with `isTesSuccess(<variable>)`.
2026-03-18 14:15:10 +00:00
yinyiqian1
6fbeb04d9e fix: Disallow empty permission list when Delegate object is absent (#6542)
This change fixes delegation:
* If the Delegate object is not present, we should disallow empty permission list in DelegateSet preclaim.
* Empty permission list is only allowed to delete the existing Delegate object.
* In `doApply`, permission list being empty returns `tecINTERNAL`, which should not happen.
2026-03-18 13:39:31 +00:00
Alex Kremer
2a325e7e2c chore: Enable clang-tidy bugprone-use-after-move check (#6476) 2026-03-18 00:12:06 +00:00
Bart
808e814489 ci: Update check-pr-title action hash (#6572) 2026-03-17 23:26:01 +00:00
Copilot
9e14707e77 fix: Peer crawler port field type inconsistency (#6318)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mvadari <8029314+mvadari@users.noreply.github.com>
Co-authored-by: Mayukha Vadari <mvadari@gmail.com>
Co-authored-by: Mayukha Vadari <mvadari@ripple.com>
Co-authored-by: Bart <bthomee@users.noreply.github.com>
2026-03-17 22:03:56 +00:00
Mayukha Vadari
95a45d7442 chore: Add comment explaining why ammLPHolds is called twice (#6546) 2026-03-17 20:11:36 +00:00
Bart
5fc4ab3e37 ci: Let required runs be triggered by merge group events (#6563)
Co-authored-by: Bart <11445373+bthomee@users.noreply.github.com>
2026-03-17 20:03:48 +00:00
tequ
b129b71c33 refactor: Use ReadView instead of ApplyView in authorizedDepositPreauth() (#6560) 2026-03-17 15:56:51 -04:00
tequ
013c2d6a56 refactor: Add const qualifier to SLE in verifyDepositPreauth parameter (#6555) 2026-03-17 19:33:18 +00:00
Alex Kremer
72f4cb097f refactor: Enable remaining clang-tidy cppcoreguidelines checks (#6538) 2026-03-17 19:09:05 +00:00
Michael Legleux
b523770486 fix: Remove nonexistent boost::coroutine2 library (#6561) 2026-03-17 18:46:46 +00:00
Mayukha Vadari
a5185890ff refactor: Remove dead code in escrow helper logic (#6553) 2026-03-17 18:13:08 +00:00
Jingchen
0a9513e7f3 ci: Fix build errors on Windows (#6562) 2026-03-17 13:50:44 -04:00
Mayukha Vadari
78b2d70a11 refactor: Assorted small DID fixes (#6552)
This change:
* Makes `addSLE` in `DIDSet` a static function, instead of a free function.
* Renames `Attestation` to `Data` everywhere (an artifact of a previous name for the field).
* Actually runs a set of tests that were not included in the `run` function of `DID_test`.
2026-03-17 14:44:07 +00:00
Mayukha Vadari
252c6768df refactor: Clean up getFeePayer, mSourceBalance, and mPriorBalance (#6478)
This change:
* Introduces a new helper function on `STTx`, `getFeePayer`.
* Removes the usage of `mSourceBalance` and replaces it with SLE balance lookups.
* Renames `mPriorBalance` to `preFeeBalance_`

This simplifies some of the code in the transactors and makes it a lot more readable.
2026-03-17 14:12:16 +00:00