Conversation
- add early `sfBatchSigners` size check - fix log nomenclature
There was a problem hiding this comment.
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 priorfeatureBatch/ removingfixBatchInnerSigsusage). - Updates batch signature message construction to include
finishMultiSigningDatafor batch signers and strengthens signer validation to ensure all signers are checked. - Refactors batch signer authorization checks from
TransactorintoBatch, 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."); |
There was a problem hiding this comment.
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.
| return Unexpected("Missing BatchSigners field."); | |
| return {}; |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
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
.gitignore, formatting, dropping support for older tooling)API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)