Skip to content
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

Improve CoinJoinClient by extracting OutputRegistration Phase related progress #7533

Merged
merged 7 commits into from
Mar 15, 2022

Conversation

molnard
Copy link
Contributor

@molnard molnard commented Mar 11, 2022

based on #7529

I've also added a phase-specific timeout cancellationToken.

@molnard molnard self-assigned this Mar 11, 2022
@molnard
Copy link
Contributor Author

molnard commented Mar 12, 2022

Tested with 10 wallets, seems to be working OK. I know this specific PR is not a big change but I am also testing the new time distribution of requests.

https://mempool.space/testnet/tx/2fcb11a7554a4280decfe23f7fb540327dace1e444063b26f4c738644ecf818e

@molnard
Copy link
Contributor Author

molnard commented Mar 13, 2022

CoinJoinClient.cs improves its Code Health from 8.36 -> 8.83

@molnard molnard requested a review from adamPetho March 13, 2022 09:46
@yahiheb
Copy link
Collaborator

yahiheb commented Mar 14, 2022

Code LGTM

MaxHillebrand
MaxHillebrand previously approved these changes Mar 14, 2022
Copy link
Contributor

@MaxHillebrand MaxHillebrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK b4c34dc

runs smooth.

adamPetho
adamPetho previously approved these changes Mar 14, 2022
Copy link
Collaborator

@lontivero lontivero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very good.

WalletWasabi/WabiSabi/Client/CoinJoinClient.cs Outdated Show resolved Hide resolved
var outputRegistrationEndTime = DateTimeOffset.UtcNow + (remainingTime * 0.8);
var readyToSignEndTime = outputRegistrationEndTime + remainingTime * 0.2;

using CancellationTokenSource outputRegPhaseTimeoutCts = new(remainingTime + TimeSpan.FromMinutes(1));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does the magic 1min comes from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra margin, the value coming from common sense - synchronization delays with the coordinator. Maybe it is too much, but we are on the right side of the horse because under no circumstances should the client cancels the operations accidentally before it was canceled by the backend.

WalletWasabi/WabiSabi/Client/CoinJoinClient.cs Outdated Show resolved Hide resolved
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs Outdated Show resolved Hide resolved
WalletWasabi/WabiSabi/Client/CoinJoinClient.cs Outdated Show resolved Hide resolved
@molnard molnard dismissed stale reviews from adamPetho and MaxHillebrand via 378ec41 March 15, 2022 10:33
@molnard molnard merged commit e4aacec into WalletWasabi:master Mar 15, 2022
@molnard molnard deleted the extractoutput branch March 15, 2022 12:38
@molnard
Copy link
Contributor Author

molnard commented Mar 15, 2022

Lucas ACK-ed on a meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants