-
Notifications
You must be signed in to change notification settings - Fork 16
Batch [DO NOT MERGE] #561
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: sync-2.4.0
Are you sure you want to change the base?
Batch [DO NOT MERGE] #561
Conversation
- Specification: [XRPLF/XRPL-Standards 56](https://github.com/XRPLF/XRPL-Standards/blob/master/XLS-0056d-batch/README.md) - Amendment: `Batch` - Implements execution of multiple transactions within a single batch transaction with four execution modes: `tfAllOrNothing`, `tfOnlyOne`, `tfUntilFailure`, and `tfIndependent`. - Enables atomic multi-party transactions where multiple accounts can participate in a single batch, with up to 8 inner transactions and 8 batch signers per batch transaction. - Inner transactions use `tfInnerBatchTxn` flag with zero fees, no signature, and empty signing public key. - Inner transactions are applied after the outer batch succeeds via the `applyBatchTransactions` function in apply.cpp. - Network layer prevents relay of transactions with `tfInnerBatchTxn` flag - each peer applies inner transactions locally from the batch. - Batch transactions are excluded from AccountDelegate permissions but inner transactions retain full delegation support. - Metadata includes `ParentBatchID` linking inner transactions to their containing batch for traceability and auditing. - Extended STTx with batch-specific signature verification methods and added protocol structures (`sfRawTransactions`, `sfBatchSigners`).
| case ttREMARKS_SET: { | ||
| break; | ||
| } | ||
| case ttBATCH: { |
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.
To be discussed:
- Is Batch allowed as EmittedTxn?
- If allowed, how should Callback be handled?
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.
I vote yes and singularly at the end of the batch txn execution like any other txn. We might need additional hook apis to support the extra metadata
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.
Should cbak() handle both OuterTxn and InnerTxns individually?
Also, since InnerTxn doesn't have information on whether it was emitted from a Hook itself, we might need to set the EmitDetails field on InnerTxn as well.
d7d49ea to
1da0089
Compare
|
New Hook API Ideas
|
|
For now, we'll only allow BatchTx.InnerTransactions.sfAccount = HookAccount (since signatures from other accounts can't be provided), but in the future, we might consider including transactions from other accounts in InnerTxns if there's authorization via OtxnAccount. |
|
Points for consideration: |
High Level Overview of Change
Context of Change
Type of Change
.gitignore, formatting, dropping support for older tooling)API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)