XRPLF / XRPL-Standards

XLS: XRP(L) community defined Suggestions, Proposals, RFCs / Standards / Drafts & discussions, to be added to the core protocol, used for platform & apps devemopment, etc.
MIT License
187 stars 48 forks source link

XLS-56d: Atomic/Batch Transactions #197

Open mvadari opened 4 months ago

mvadari commented 4 months ago

Discussion thread can be found here: https://github.com/XRPLF/XRPL-Standards/discussions/162

This PR will be left open for easier commenting of specific lines/sections. The discussion will also still be available for ease of commenting for non-technical people.

dangell7 commented 1 week ago

An Inner account delete should be blocked if the same account is submitting the batch.

dangell7 commented 1 week ago

I'm currently signing the entire txn for BatchSigners as I do not understand the TxnIDs completely and have not implemented that. It will also require more custom logic in both the rippled and repos to sign an array of hashes and a flag field.

dangell7 commented 1 week ago

RE BatchIndex

Before it was thought that the batch index was the index of the transaction for a specific account. Now or with the addition of tickets, it is more correctly the index of the transaction for an account/sequence/ticket. Previously we were adding +1 to the sequence calculation if the batch txn was the outer account, however if using a combination of sequence and tickets there is no way to know. So the index needs to be calculated prior to submission.

Some examples.

OuterTxn: Alice using ticket
InnerTxn: Alice using sequence (Index = 0)
InnerTxn: Alice using sequence (Index = 1)
OuterTxn: Alice using ticket
InnerTxn: Alice using ticket (Index = 1)
InnerTxn: Alice using sequence (Index = 0)
OuterTxn: Alice using sequence
InnerTxn: Alice using ticket (Index = 0)
InnerTxn: Alice using sequence (Index = 1)