Skip to content

feat: Batch (XLS-56) V1_1#6446

Open
dangell7 wants to merge 9 commits intodevelopfrom
dangell7/batch-v1
Open

feat: Batch (XLS-56) V1_1#6446
dangell7 wants to merge 9 commits intodevelopfrom
dangell7/batch-v1

Conversation

@dangell7
Copy link
Collaborator

@dangell7 dangell7 commented Feb 26, 2026

High Level Overview of Change

Context of Change

XLS spec: https://github.com/XRPLF/XRPL-Standards/blob/master/XLS-0056d-batch/README.md

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)

Copilot AI review requested due to automatic review settings February 26, 2026 22:40
@dangell7 dangell7 changed the title Batch (XLS-56) V1_1 feat: Batch (XLS-56) V1_1 Feb 26, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Batch transaction implementation to a new amendment name/version (“BatchV1_1”), adjusts batch signature construction/verification, and refreshes the related validation paths and unit tests.

Changes:

  • Renames/gates Batch functionality under featureBatchV1_1 (replacing prior featureBatch / removing fixBatchInnerSigs usage).
  • Updates batch signature message construction to include finishMultiSigningData for batch signers and strengthens signer validation to ensure all signers are checked.
  • Refactors batch signer authorization checks from Transactor into Batch, and updates/extends tests accordingly.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/xrpld/overlay/detail/PeerImp.cpp Updates overlay comments to reference featureBatchV1_1.
src/xrpld/app/misc/NetworkOPs.cpp Switches network submission/processing checks to featureBatchV1_1.
src/test/rpc/Feature_test.cpp Updates feature name expectation for the Batch amendment.
src/test/jtx/impl/batch.cpp Adjusts batch signer signature construction (finishMultiSigningData).
src/test/app/Batch_test.cpp Updates tests to use featureBatchV1_1, removes fixBatchInnerSigs branching, and adds a regression test ensuring all signers are validated.
src/libxrpl/tx/transactors/Lending/LoanSet.cpp Switches inner-batch gating to featureBatchV1_1.
src/libxrpl/tx/transactors/Batch.cpp Adds bounds checks, improves signer diagnostics, and introduces Batch::checkBatchSign used from Batch::checkSign.
src/libxrpl/tx/apply.cpp Updates inner-batch handling to key off featureBatchV1_1 and removes legacy inner-sig behavior.
src/libxrpl/tx/Transactor.cpp Switches inner-batch gating to featureBatchV1_1 and removes Transactor::checkBatchSign.
src/libxrpl/protocol/STTx.cpp Tightens batch signature verification flow; updates single-sign batch digest construction and error reporting.
include/xrpl/tx/transactors/Batch.h Declares Batch::checkBatchSign.
include/xrpl/tx/Transactor.h Removes checkBatchSign API and adjusts access to allow Batch to reuse signing helpers.
include/xrpl/protocol/detail/transactions.macro Gates ttBATCH on featureBatchV1_1.
include/xrpl/protocol/detail/features.macro Introduces BatchV1_1 and removes prior Batch-related amendment entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

return Unexpected("Not a batch transaction.");
}
if (!isFieldPresent(sfBatchSigners))
return Unexpected("Missing BatchSigners field.");
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

sfBatchSigners is marked soeOPTIONAL for ttBATCH (see transactions.macro), but STTx::checkBatchSign() now returns an error when the field is missing. That makes the method semantics surprising for callers that may reasonably want to validate a batch txn regardless of whether it includes BatchSigners (e.g., batches where all inner txns are from the outer account). Consider treating a missing sfBatchSigners as success (no signatures to validate), or alternatively make sfBatchSigners required at the transaction format level if the field must always be present in V1_1.

Suggested change
return Unexpected("Missing BatchSigners field.");
return {};

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 93.33333% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.8%. Comparing base (2e595b6) to head (200f93a).

Files with missing lines Patch % Lines
src/libxrpl/protocol/STTx.cpp 60.0% 2 Missing ⚠️
src/libxrpl/tx/transactors/Batch.cpp 96.9% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #6446     +/-   ##
=========================================
- Coverage     79.8%   79.8%   -0.0%     
=========================================
  Files          848     848             
  Lines        67757   67760      +3     
  Branches      7554    7560      +6     
=========================================
- Hits         54073   54064      -9     
- Misses       13684   13696     +12     
Files with missing lines Coverage Δ
include/xrpl/protocol/detail/transactions.macro 100.0% <ø> (ø)
include/xrpl/tx/Transactor.h 100.0% <ø> (ø)
include/xrpl/tx/transactors/Batch.h 100.0% <ø> (ø)
src/libxrpl/tx/Transactor.cpp 93.0% <100.0%> (-0.3%) ⬇️
src/libxrpl/tx/apply.cpp 93.5% <100.0%> (-0.5%) ⬇️
src/libxrpl/tx/transactors/Lending/LoanSet.cpp 91.3% <100.0%> (ø)
src/xrpld/app/misc/NetworkOPs.cpp 70.1% <100.0%> (+<0.1%) ⬆️
src/xrpld/overlay/detail/PeerImp.cpp 5.9% <ø> (ø)
src/libxrpl/tx/transactors/Batch.cpp 93.8% <96.9%> (-1.4%) ⬇️
src/libxrpl/protocol/STTx.cpp 88.8% <60.0%> (+0.1%) ⬆️

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

@mvadari mvadari requested review from mvadari and ximinez February 27, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants