0069 XLS-69d: Simulating Transaction Execution #199
Replies: 7 comments 16 replies
-
It might be better to clearly note that there is no guarantee that the results of |
Beta Was this translation helpful? Give feedback.
-
I am slightly worried about the cost of processing such transactions in validators. We know there are certain transactions which can be expensive to process e.g. in terms of CPU time, and it would be pretty bad if validators started processing these in large numbers, without actual change in the ledger, but with all the associated data processing cost. To address this concern, I would suggest to add an error code |
Beta Was this translation helpful? Give feedback.
-
This functionality seems useful, however, I wanted to clarify the underlying purpose. Do you see this as predictive of the outcome of large or complex transactions (i.e., the volume of currency that is delivered), or is this targeted toward ensuring the transaction is formatted and submitted correctly? Given how dependent transaction outcomes are on the Ledger's state, it seems the former would not be possible, as the state could change substantially in the interval between the simulated and real transactions (even if the real tx hits in the subsequent ledger to the simulation). If the latter, I'm curious how the simulated transaction benefits from being tested on the main network. I admit it is more convenient not to switch networks, but it's realistically not a massive barrier. Perhaps access to more paths and liquidity could give a more accurate simulation? Finally, is there reason to believe a simulated transaction could take more resources than the actual transaction? It seems like the actual would always take more, since the signature needs to be verified, so I'm interested in the line where this would become admin only. |
Beta Was this translation helpful? Give feedback.
-
I love it, it's an excellent feature! Though, I do have one concern. While a malicious node cannot submit these transactions, they can replay them. For instance, imagine someone is testing a valuable DEX trade. A malicious node will gain information that a trader might submit this transaction in the future or verify that executing this trade is profitable. Before the user submits the real transaction, the malicious node might submit the same transaction using their own private account. That is to say; I think it's important to also caveat this API endpoint that it should only be called on trusted nodes or, even better, on one's own node. |
Beta Was this translation helpful? Give feedback.
-
So with this attack, I wouldn't be submitting your transaction, but mine.
It would just do exactly the same thing as yours. The absence of the
signature doesn't help against this
…On Tue, Jun 4, 2024, 17:20 Mayukha Vadari ***@***.***> wrote:
The signature *must not* be included in simulate, for that exact reason.
Great, thanks - I missed this part. I suggest the error in this case
should be the same as if the signature was invalid, i.e. temBAD_SIGNATURE
In that case, the error will be an RPC-level error. I'd prefer if the
transaction processing part of rippled isn't entered *at all* if there is
a signature included in the transaction.
—
Reply to this email directly, view it on GitHub
<#199 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMDKUYLJ5A2WSDOC3MYAUDZFXSOBAVCNFSM6AAAAABIXCEIZSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TMNRXGEYTK>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Per the new XLS Contributing process, it is my opinion that we have reached a "well-refined standard." As such, I propose that we move this discussion to a file (via #207) and work on final changes using additional PRs, for better change-tracking. Please comment here if you would like to object to moving this spec/discussion forward in the process into a DRAFT spec. (Note that per the Contributing guidelines, moving a spec into the DRAFT state does not mean any kind of endorsement, nor does it mean that this specification will become adopted. It is solely meant as a mechanism to enable better change tracking using PRs.) |
Beta Was this translation helpful? Give feedback.
-
Closing this discussion since the spec has been initially merged via #207. For further discussion or changes, please open a PR on XLS-69d. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
An updated version of this spec can be found here: XLS-69: Simulate.
The earlier version can be found by looking at the edit history.
Beta Was this translation helpful? Give feedback.
All reactions