-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: Inner batch transactions never have valid signatures #6069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
- Introduces amendment `fixBatchInnerSigs`
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6069 +/- ##
=========================================
- Coverage 78.6% 78.6% -0.0%
=========================================
Files 818 818
Lines 68938 68944 +6
Branches 8240 8236 -4
=========================================
- Hits 54177 54172 -5
- Misses 14761 14772 +11
🚀 New features to boost your workflow:
|
| auto const pkSigner = sigObject.getFieldVL(sfSigningPubKey); | ||
| // Ignore signature check on batch inner transactions | ||
| if (sigObject.isFlag(tfInnerBatchTxn) && view.rules().enabled(featureBatch)) | ||
| bool const useCtx = view.rules().enabled(fixBatchInnerSigs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesnt seem right. Can't you just check for the parentBatchId?
| // original `Batch` implementation. An inner transaction never | ||
| // has a valid signature. | ||
| bool const neverValid = rules.enabled(fixBatchInnerSigs); | ||
| if (!neverValid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing code coverage.
…nersigs * XRPLF/develop: Implement Lending Protocol (unsupported) (5270)
High Level Overview of Change
Introduces a fix amendment that will skip over a problematic and unnecessary block in
checkValiditythat will set flags indicating that an inner transaction has a valid signature. Inner transactions, by definition, never have valid signatures.I don't think this is exploitable as such, because there are additional checks before an inner transaction is applied to the ledger, but why take that chance?
It updates some of the callers of
checkValidityto skip over the function if thetfInnerBatchTxnflag is set, either by treating it as always valid, or always invalid, depending on the context. The remaining will always fail for an inner tx.Introduces amendment
fixBatchInnerSigs.Context of Change
This discussion on the Lending Protocol implementation PR: #5270 (comment)
Type of Change