Skip to content
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

Fix method call_api for "submit" api-method calls with "sign & submit" mode support #28

Open
DScheglov opened this issue Feb 19, 2015 · 0 comments

Comments

@DScheglov
Copy link
Contributor

There is risk of duplicate processing of transaction
if "sign & submit" mode used for call "submit" api-method
(https://ripple.com/build/rippled-apis/#submit)

if call to one server will be timeouted the call_api
will send request to another, but the first call can
be proccesed succesfully (timeout coused by network
problems). So both the first and the second calls
can be succeeded.

Risk is more significant for Payment transaction and
less for TrustSet (but, it is possible too).

To prevent this risk occuring the following changes are
required:

  1. function "call_api"
    • identify "sign & submit" mode by request
      • request.method == "submit" and
      • request.params.secret is not null
    • verify if tx_blob transfered in request
      • request.params.tx_blob is not null
  2. function "trust_set":
    • call "call_api" with "sign" api-method request
    • call submit function with tx_blob received in 2.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant