Skip to content

Conversation

a1q123456
Copy link
Collaborator

@a1q123456 a1q123456 commented Jun 11, 2025

High Level Overview of Change

This PR refactors CredentialHelpers and removes some unnecessary dependencies as a step of modularisation.

Context of Change

The ledger component is almost independent except that it references to MPTokenAuthorize and CredentialHelpers.h, and the later one further references to Transactor.h. This PR partially clears the path to modularising the ledger component and decouples CredentialHelpers from xrpld.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

This PR doesn't affect any API

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

Test Plan

This PR doesn't introduce any functional changes so we should do some regression tests to double check if everything is still working properly.

Future Tasks

In the next PR, we should move some logic from MPTokenAuthorize.cpp to View.cpp so that it's possible to modularise the ledger module.

@a1q123456 a1q123456 requested a review from a team as a code owner June 11, 2025 15:02
@a1q123456 a1q123456 changed the title Decouple credential helpers from xrpld/app/tx Decouple CredentialHelpers from xrpld/app/tx Jun 11, 2025
Copy link

codecov bot commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.1%. Comparing base (c2f3e2e) to head (1dec6da).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #5487   +/-   ##
=======================================
  Coverage     79.1%   79.1%           
=======================================
  Files          816     816           
  Lines        71605   71622   +17     
  Branches      8237    8237           
=======================================
+ Hits         56626   56643   +17     
  Misses       14979   14979           
Files with missing lines Coverage Δ
src/xrpld/app/misc/CredentialHelpers.cpp 97.8% <100.0%> (-<0.1%) ⬇️
src/xrpld/app/tx/detail/DeleteAccount.cpp 91.9% <100.0%> (+0.2%) ⬆️
src/xrpld/app/tx/detail/Escrow.cpp 93.6% <100.0%> (+<0.1%) ⬆️
src/xrpld/app/tx/detail/PayChan.cpp 90.5% <100.0%> (+0.1%) ⬆️
src/xrpld/app/tx/detail/Payment.cpp 93.7% <100.0%> (+0.2%) ⬆️

... and 3 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Bronek
Copy link
Collaborator

Bronek commented Jun 23, 2025

@a1q123456 this is really nice ! Please do update (and keep updating) this branch from develop so it can be eventually merged.

@a1q123456 a1q123456 force-pushed the a1q123456/decouple-credential-helpers branch from 5589421 to ceb642c Compare June 24, 2025 10:38
@a1q123456 a1q123456 force-pushed the a1q123456/decouple-credential-helpers branch from ceb642c to 74069d8 Compare June 24, 2025 11:08
@Bronek Bronek added the Needs second review PR requires at least one more code review approval before it can be merged label Jul 2, 2025
Copy link
Collaborator

@vvysokikh1 vvysokikh1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please merge latest develop

@a1q123456 a1q123456 requested a review from yinyiqian1 July 3, 2025 13:07
@a1q123456 a1q123456 added Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. and removed Needs second review PR requires at least one more code review approval before it can be merged labels Jul 3, 2025
@bthomee bthomee enabled auto-merge (squash) July 3, 2025 13:49
@bthomee bthomee merged commit 9874d47 into develop Jul 3, 2025
27 checks passed
@bthomee bthomee deleted the a1q123456/decouple-credential-helpers branch July 3, 2025 14:27
ximinez added a commit that referenced this pull request Jul 21, 2025
…refactoring-1

* upstream/develop: (56 commits)
  Remove `include(default)` from libxrpl profile (#5587)
  refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
  Fix macos runner (#5585)
  Remove the type filter from "ledger" RPC command (#4934)
  refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567)
  test: Run unit tests regardless of 'Supported' amendment status (#5537)
  Retire Flow Cross amendment (#5562)
  chore: Update CI to use Conan 2 (#5556)
  fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
  chore: Add gcc-12 workaround (#5554)
  Add MPT related txns into issuer's account history  (#5530)
  chore: Remove unused headers (#5526)
  fix: add allowTrustLineLocking flag for account_info (#5525)
  Downgrade required CMake version for Antithesis SDK (#5548)
  fix: Link with boost libraries explicitly (#5546)
  chore: Fix compilation error with clang-20 and cleanup (#5543)
  test: Remove circular jtx.h dependencies (#5544)
  Decouple CredentialHelpers from xrpld/app/tx (#5487)
  fix: crash when trace-logging in tests (#5529)
  test: switch some unit tests to doctest (#5383)
  ...
ximinez added a commit that referenced this pull request Jul 22, 2025
…actoring-2

* ximinez/lending-refactoring-1: (57 commits)
  Fix formatting
  Remove `include(default)` from libxrpl profile (#5587)
  refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
  Fix macos runner (#5585)
  Remove the type filter from "ledger" RPC command (#4934)
  refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567)
  test: Run unit tests regardless of 'Supported' amendment status (#5537)
  Retire Flow Cross amendment (#5562)
  chore: Update CI to use Conan 2 (#5556)
  fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
  chore: Add gcc-12 workaround (#5554)
  Add MPT related txns into issuer's account history  (#5530)
  chore: Remove unused headers (#5526)
  fix: add allowTrustLineLocking flag for account_info (#5525)
  Downgrade required CMake version for Antithesis SDK (#5548)
  fix: Link with boost libraries explicitly (#5546)
  chore: Fix compilation error with clang-20 and cleanup (#5543)
  test: Remove circular jtx.h dependencies (#5544)
  Decouple CredentialHelpers from xrpld/app/tx (#5487)
  fix: crash when trace-logging in tests (#5529)
  ...
ximinez added a commit that referenced this pull request Jul 22, 2025
…actoring-3

* ximinez/lending-refactoring-2: (57 commits)
  Fix formatting
  Remove `include(default)` from libxrpl profile (#5587)
  refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
  Fix macos runner (#5585)
  Remove the type filter from "ledger" RPC command (#4934)
  refactor: Update date, libarchive, nudb, openssl, sqlite3, xxhash packages (#5567)
  test: Run unit tests regardless of 'Supported' amendment status (#5537)
  Retire Flow Cross amendment (#5562)
  chore: Update CI to use Conan 2 (#5556)
  fixAMMClawbackRounding: adjust last holder's LPToken balance (#5513)
  chore: Add gcc-12 workaround (#5554)
  Add MPT related txns into issuer's account history  (#5530)
  chore: Remove unused headers (#5526)
  fix: add allowTrustLineLocking flag for account_info (#5525)
  Downgrade required CMake version for Antithesis SDK (#5548)
  fix: Link with boost libraries explicitly (#5546)
  chore: Fix compilation error with clang-20 and cleanup (#5543)
  test: Remove circular jtx.h dependencies (#5544)
  Decouple CredentialHelpers from xrpld/app/tx (#5487)
  fix: crash when trace-logging in tests (#5529)
  ...
This was referenced Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants