Coder Social home page Coder Social logo

Duplicate transactions about xrpl.js HOT 7 CLOSED

xrplf avatar xrplf commented on May 29, 2024
Duplicate transactions

from xrpl.js.

Comments (7)

sublimator avatar sublimator commented on May 29, 2024

This could be caused by serverStatus messages triggering recalculation of tx_json.Fee

This would mean that the transactionID (tx._hash) would be recomputed upon resubmit (timeout etc) and it would be possible that validated transaction messages wouldn't be found in the hash lookup cache, while consuming a Sequence, and thus triggering Sequence++ before resubmission.

Every transactionID that a given transaction has been submitted with must be stored, and checked against incoming validated transaction messages.

The role of tx._hash could perhaps be better filled by something akin to tx._submittedHashes = [...] ?

from xrpl.js.

sublimator avatar sublimator commented on May 29, 2024

It doesn't seem like submit response handlers are muted upon a request timeout: https://github.com/ripple/ripple-lib/blob/develop/src/js/ripple/transactionmanager.js#L339-L345

That could potentially lead to multiple concurrent streams of resubmission logic

from xrpl.js.

wltsmrz avatar wltsmrz commented on May 29, 2024

Submit response handlers are muted upon a request timeout. If you use request.timeout(milliseconds, fn) and the request doesn't receive a success or error within milliseconds, the timeout function will prevent future events from being emitted on the request. i.e. when a request times-out, you can expect that no more events will be emitted from it.

from xrpl.js.

sublimator avatar sublimator commented on May 29, 2024

All I saw was bail outs when tx.finalized

Is there something built in to EventEmitter or something?

from xrpl.js.

sublimator avatar sublimator commented on May 29, 2024

https://github.com/ripple/ripple-lib/blob/develop/src/js/ripple/request.js#L98-L103

from xrpl.js.

sublimator avatar sublimator commented on May 29, 2024

Ah, I see

from xrpl.js.

wltsmrz avatar wltsmrz commented on May 29, 2024

Assume that this has been fixed with recent updates to transactionmanager.js until we can confirm otherwise.

from xrpl.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.