Comments (5)
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.
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.
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.
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.
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)
- Settling after finalization through ForceUpdate HOT 2
- Separate Ethereum backend HOT 1
- Settle channel when funding fails HOT 1
- Separate type for channel.AppID
- Failing client tests: Invalid version
- Deadlock when accessing channel state
- Replace `context.TODO()` with appropriate context HOT 1
- Add Adjudicator Getter for Multi-Adjudicator
- Create test case for dispute with app
- Cannot close multi-ledger Channel
- Unclear specification of adjudication methods HOT 1
- Implement timeouts for mock backend subscription
- Create a MAINTAINERS.md file HOT 1
- Risk of conflicting channel states
- Add authentication to wire commmunication (handshake) HOT 2
- Multi-backend: Specify intended chain ID(s) in channel Params/proposal, clarify architecture. HOT 3
- Improve race detection in endpoint registry
- More generic `ChannelID` calculation
- Include Cardano backend in README
- Failing unit tests HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-perun.