Code Monkey home page Code Monkey logo

Comments (3)

haojun avatar haojun commented on July 24, 2024

If I understand you correctly, the problem is that a transaction may has been committed even if sendTransaction returns a rejected promise.

A easy way to correct it is ignoring the REQUEST_TIMEOUT error and continuing waiting for all event promises. For other known errors such as SERVICE_UNAVAILABLE, there is no reason to continue, right?

What's your opinion?

BTW: since step 6 is optional, when would it be applied?

from caliper.

aklenik avatar aklenik commented on July 24, 2024

Exactly. In my fork, I essentially ignore the orderer response (only log the error). The event results will determine the final status of the transaction.

Another thought: I use Promise.All on the event promises, but Promise.Any would be enough I think. If one peer successfully commits the transaction, then every other peer will commit it eventually, so the occasional event hub error of one/some peers should not deem the transaction failed. However, if I want to calculate percentile-based commit times (as discussed by the PSWG), then I need every event notification.

About step 6: it is a little fuzzy whether this should be performed in the invokebycontext function, or as a post-processing step after the round that queries every failed, but not verified transaction. And whether to incorporate that query time somewhere or not. As a first step, I think Caliper should be able to mark such transactions as "verified after the life-cycle" to avoid false negative results and give the option for data analysts to ignore such transaction times during the analysis.

from caliper.

haojun avatar haojun commented on July 24, 2024

It sounds good. Would you please submit the PR? I'll be very happy to review it, thanks.

from caliper.

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.