Git Product home page Git Product logo

Comments (5)

manoranjith avatar manoranjith commented on July 29, 2024

The second possibility seems more interesting to me compared to the first one.

Because in the first case, the secondary flag has to be received at the top level API and should be propagated across different methods in the core of go-perun as well as the backend.

Whereas, in the second case, the user of the go-perun calls the wait function before Register/Settle as necessary. Also the secondary logic need to be included in any part of the go-perun (both core & backend). This also means the same objective achieved with lesser number of lines of code.

from go-perun.

ggwpez avatar ggwpez commented on July 29, 2024

The second possibility seems more interesting to me compared to the first one.

Im not sure if a waitNBlocks function instead of a secondary flag makes it less block chain agnostic.
In an instant-finality (but high TX fee) chain for example, this would complicate things.
What do you think @matthiasgeihs ?

from go-perun.

matthiasgeihs avatar matthiasgeihs commented on July 29, 2024

I don't see a big problem with having a transaction revert. If the transaction reverts because the channel has already been registered, that's ok, because the goal was to register the channel. The framework should just acknowledge that the channel has been registered, log the transaction error, but do not return the error to the user, as the goal of registering the channel has been fulfilled.

from go-perun.

ggwpez avatar ggwpez commented on July 29, 2024

I don't see a big problem with having a transaction revert.

Well it is not directly a "problem" because everything works as expected.
It is more of an optimization. We tried to build go-perun to be as gas efficient as possible.
This also means to prevent reverting transactions, hence why we introduced the secondary flag on the Settle call.

It is sure up for discussion on how far we should go here.

from go-perun.

matthiasgeihs avatar matthiasgeihs commented on July 29, 2024

We may consider this optimization at a later point when it becomes relevant in a concrete use case. Closing this issue for now.

from go-perun.

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.