-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Egoistic Funding #45
Introduce Egoistic Funding #45
Conversation
045c784
to
2653189
Compare
…r-labs#33) * CI: Diff binding instead of go test Signed-off-by: Matthias Geihs <[email protected]> * Update binding Use same compiler version as in CI. Signed-off-by: Matthias Geihs <[email protected]> Signed-off-by: Matthias Geihs <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
- The method did not have a pointer receiver and thus could not set the value, resulting in the previous (default) value instead of the just unmarshalled one. - Additionally, the order was different from `Asset.MarshallBinary`, which meant unmarshalling a value just marshalled would result in the wrong value or an error. The added test coveres both these cases. Signed-off-by: Jens Winkle <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
One of the participants can be egoistic and only deposits only if the other(s) have deposited their amount Signed-off-by: Philipp-Florens Lehwalder <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
Fix WaitForOthersFundingConfirmation to wait for all assets to be confirmed. Works only for same-chain Swap. For cross-chain we need coordination between funders -> go-perun. Signed-off-by: Sophia Koehler <[email protected]>
… uses the AdjudicatorReq object during conclusion of a channel. Also remove functions that are necessary for the Secondary option. Update(go.mod/go.sum): Update go.mod and go.sum to the most recent go-perun commit. Signed-off-by: Ilja von Hoessle <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
…ce since v0.10.7. * fix(channel/test): Include Randomizer for AppID type to generate random AppIDs for tests. * fix(client/client_test.go): Adapt appID to the new AppID type. * fix(channel/backend.go): Adapt app generation to new AppID type, include NewAppID method. * fix(channel/subscription.go): Adapt convertEvent to new AppID type. * chore(go.mod, go.sum): Update go-perun version to a v0.10.7 commit. Signed-off-by: Ilja von Hoessle <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
Signed-off-by: Ilja von Hoessle <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
Signed-off-by: Ilja von Hoessle <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
Signed-off-by: Ilja von Hoessle <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
…nction Signed-off-by: Ilja von Hoessle <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
Signed-off-by: Ilja von Hoessle <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
* channel: Include shared Nonce object, incrementing the nonce of an account while the transaction is broadcast. Implement sync.Mutex, locking the nonce incrementals. In erc20_depositor.go, the depositing process is locked during the "Approve" function call with ```lockKey```. The function ```(d *ERC20Depositor) Deposit``` is renamed to `````(d *ERC20Depositor) DepositOnly` * client: To avoid timeouts caused by the added locking mechanism during ERC20 deposits, ```context.WithTimeout``` and ```twoPartyTestTimeout``` has been increased in fund_test.go and payment_test.go. * client/test: Timeouts have been increased to avoid premature timeout errors due to the locking mechanism above. --------- Signed-off-by: Ilja von Hoessle <[email protected]> Signed-off-by: sophia1ch <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
Remove unused SharedNonceMtx. Signed-off-by: sophia1ch <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
refactor(erc20_depositor): - Create seperate function for Approval. - Rename lock and mutex. Signed-off-by: sophia1ch <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
- Add description to Approve function. - Put Error as last return element in Approve function. fix(erc20_depositor): - remove unnecessary locking of depositLocksMtx. Signed-off-by: sophia1ch <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
Fix comment and Argument order for Linter. Signed-off-by: sophia1ch <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
Signed-off-by: sophia1ch <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
Co-authored-by: Philipp Lehwalder <[email protected]> Signed-off-by: Sophia <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
- Change SharedMutex to SharedExpectedNoncesMutex. refactor(erc20_depositor): - Return directly if Approval returns error. - Fix comments. Signed-off-by: sophia1ch <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
Change position of bracket. Signed-off-by: sophia1ch <[email protected]> Signed-off-by: Sophia Koehler <[email protected]>
Signed-off-by: Sophia Koehler <[email protected]>
This reverts commit fe3c63f. Signed-off-by: Sophia Koehler <[email protected]>
…on go-perun. Signed-off-by: Sophia Koehler <[email protected]>
Signed-off-by: Sophia Koehler <[email protected]>
Signed-off-by: Sophia Koehler <[email protected]>
91b3ddd
to
13b8e9b
Compare
Signed-off-by: Sophia <[email protected]>
Signed-off-by: Sophia Koehler <[email protected]>
Signed-off-by: Sophia Koehler <[email protected]>
Signed-off-by: Sophia Koehler <[email protected]>
fix(conclude): Revert 2cf67d9 and b90d670 Signed-off-by: Sophia Koehler <[email protected]>
Signed-off-by: Sophia <[email protected]>
Signed-off-by: Sophia Koehler <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Sophia Koehler <[email protected]>
Signed-off-by: Sophia Koehler <[email protected]>
…o-perun types. Signed-off-by: Sophia Koehler <[email protected]>
… go-perun. Signed-off-by: Sophia Koehler <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mock implementation of Wire Handshake and won't ensure authenticity. We probably can first merge this, but need also to create an issue and a separate PR to implement wire authentication for Perun-Eth-Backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
This PR introduced "egoistic funding" where one participant can be tagged to be egoistic using the
EgoisticPart
array (which does not change the funder interface) such that it waits until all other participants have deposited their amounts before continuing to deposit.The background to this is that in PerunX, the hub should not deposit until the client has deposited its funds to prevent losses due to gas costs if the client never actually deposits.
As a consequence, the Perun Websocket Backend needs to be adapted that one of the participants can register as egoistic (maybe even in the
Initialize
message?) and the WebSocket Backend provides information this to the funder.