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

Ban doublespenders #11372

Merged
merged 3 commits into from
Aug 28, 2023
Merged

Conversation

lontivero
Copy link
Collaborator

This PR is for banning coins that were spent after being registered for participation in a coinjoin.

Copy link
Collaborator

@adamPetho adamPetho left a comment

Choose a reason for hiding this comment

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

tACK on RegTest. Round is ended once I double spend my CJing coin & coin is punished for it. Code LGTM.

@lontivero lontivero merged commit 24dd666 into WalletWasabi:master Aug 28, 2023
6 of 7 checks passed
public void BanDoubleSpenders(object? sender, Transaction tx)
{
// Detect and punish double spending coins
var disrupters = Arena.Rounds
Copy link
Collaborator

Choose a reason for hiding this comment

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

@lontivero
This is dangerous. Arena and rounds are not designed to be touched from outside asynchronously. There is a read operation here and later you also close the round.

The only place where we are touching rounds is Arena.ActionAsync and locking AsyncLock.

You need to find a solution how to integrate this into Arena.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affiliate Could affect affiliates compatibility size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants