Sponsored Content
Skip to content

feat: Add delegate filter param for account_tx RPC - #6126

Merged
bthomee merged 44 commits into
XRPLF:developfrom
PeterChen13579:add_delegate_filter
Jul 13, 2026
Merged

feat: Add delegate filter param for account_tx RPC#6126
bthomee merged 44 commits into
XRPLF:developfrom
PeterChen13579:add_delegate_filter

Conversation

@PeterChen13579

@PeterChen13579 PeterChen13579 commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This PR adds the ability to filter account_tx results based on transaction delegation. This is useful for scenarios where one account (the delegatee) signs and submits a transaction on behalf of another account (the delegator).

Context of Change

New Request Parameter:

"delegate": {
"delegate_filter": "actor" or "authorizer",
"counter_party": "account_address"
}

Example: If User A submits a transaction to C on behalf of B:
User B (The account holder) can query with delegate_filter: "actor" to find transactions signed by others (like User A where A acted on behalf of B).
User A (The signer) can query with delegate_filter: "authorizer" to find transactions they signed for others (like User B, since B authorized A to act on their behalf).
The counter_party field can be used in either case to filter by a specific valid address

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

  • 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)

@PeterChen13579
PeterChen13579 requested a review from a team December 8, 2025 21:11
@codecov

codecov Bot commented Dec 8, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.34884% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.6%. Comparing base (2b4d067) to head (f6c087c).

Files with missing lines Patch % Lines
src/xrpld/app/rdb/backend/detail/Node.cpp 93.0% 3 Missing ⚠️
src/xrpld/rpc/handlers/account/AccountTx.cpp 97.6% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6126   +/-   ##
=======================================
  Coverage     82.6%   82.6%           
=======================================
  Files         1036    1036           
  Lines        79870   79953   +83     
  Branches      8949    8948    -1     
=======================================
+ Hits         65956   66039   +83     
  Misses       13905   13905           
  Partials         9       9           
Files with missing lines Coverage Δ
include/xrpl/rdb/RelationalDatabase.h 100.0% <ø> (ø)
src/xrpld/app/misc/NetworkOPs.cpp 69.9% <100.0%> (ø)
src/xrpld/rpc/handlers/account/AccountTx.cpp 88.5% <97.6%> (+1.8%) ⬆️
src/xrpld/app/rdb/backend/detail/Node.cpp 61.3% <93.0%> (+2.4%) ⬆️

... and 4 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.

@kuznetsss

Copy link
Copy Markdown
Contributor

A few suggestions to the new API:

  • don't duplicate delegate in filter:
"delegate": {
  "filter": "delegatee" or "delegator",
  "counter_party": "account_address"
}
  • maybe use role instead of filter?

  • I remember we had some other naming ideas for delegator and delegatee, did you decide that these one are the best?

Comment thread src/xrpld/app/rdb/backend/detail/Node.cpp Outdated
Comment thread src/xrpld/rpc/handlers/account/AccountTx.cpp Outdated
@github-actions

Copy link
Copy Markdown

This PR has conflicts, please resolve them in order for the PR to be reviewed.

@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown

All conflicts have been resolved. Assigned reviewers can now start or resume their review.

@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown

This PR has conflicts, please resolve them in order for the PR to be reviewed.

@PeterChen13579 PeterChen13579 changed the title feature: Add delegate filter param for account_tx RPC feat: Add delegate filter param for account_tx RPC Apr 6, 2026
@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown

All conflicts have been resolved. Assigned reviewers can now start or resume their review.

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good to go

Review by Claude Sonnet 4.6 · Prompt: V15

@godexsoft godexsoft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Few nits to fix/answer 👍

Comment thread include/xrpl/rdb/RelationalDatabase.h Outdated
Comment thread src/xrpld/rpc/handlers/account/AccountTx.cpp Outdated
Comment thread src/xrpld/rpc/handlers/account/AccountTx.cpp
@PeterChen13579
PeterChen13579 requested a review from godexsoft July 9, 2026 18:08

@godexsoft godexsoft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good 👍

@godexsoft godexsoft added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Jul 9, 2026
@bthomee
bthomee requested a review from Copilot July 10, 2026 01:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Comment thread src/xrpld/rpc/handlers/account/AccountTx.cpp Outdated
Comment thread src/xrpld/rpc/handlers/account/AccountTx.cpp
Comment thread src/xrpld/rpc/handlers/account/AccountTx.cpp Outdated
Comment thread include/xrpl/rdb/RelationalDatabase.h
Comment thread API-CHANGELOG.md Outdated
@github-actions

Copy link
Copy Markdown

This PR has conflicts, please resolve them in order for the PR to be reviewed.

@github-actions

Copy link
Copy Markdown

All conflicts have been resolved. Assigned reviewers can now start or resume their review.

Comment thread src/xrpld/app/rdb/backend/detail/Node.cpp
Comment thread src/xrpld/app/rdb/backend/detail/Node.cpp

@bthomee bthomee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving the latest commit containing newly added tests.

@bthomee
bthomee added this pull request to the merge queue Jul 13, 2026
Merged via the queue into XRPLF:develop with commit 752dab8 Jul 13, 2026
46 checks passed
@PeterChen13579

Copy link
Copy Markdown
Contributor Author

@maria-robobug Please note there is an API change for account_tx needed in the doc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Change 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.

8 participants