Skip to content

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

Description

@DScheglov

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions