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

Add SignalR websocket support to CCJ Tumbler and client #58

Closed
nopara73 opened this issue Oct 21, 2017 · 6 comments
Closed

Add SignalR websocket support to CCJ Tumbler and client #58

nopara73 opened this issue Oct 21, 2017 · 6 comments

Comments

@nopara73
Copy link
Contributor

The clients must know when the tumbler changes states. One solution would be polling through http, but that's inefficient.

The correct solution would be implementing Tor circuit control in .net tor: #56
And implementing a websocket notification support to DotNetTor, so only one circuit gets the websocket notifications and yet the software could communicate different ones with the tumbler.
This is a bigger breath work, but we can do this:

When a wallet fires up, it register for tumbler websocket notification, even if the user is not intending to use the tumbling. so timing attacks will not be possible. This does not happen over Tor: But everything else tumbling related does, so the state monitoring identity is separated, so privacy loss won't happen.

@nopara73 nopara73 added this to the CCJ Implementation milestone Oct 21, 2017
@nopara73
Copy link
Contributor Author

@wintercooled
Copy link
Contributor

wintercooled commented Oct 24, 2017

I have added code that will form the CCJ server. Will merge when tests are written.

For information - this includes:
CCJ tumbler SignalR broadcasting of state changes to clients.
MVC code that accepts the actions defined in the TumblerAPISpecs.
The actual CCJ code itself (in template form at present).

Design is:

A single instance of a CCJ class is created and made available to the MVC and SignalR code.

On start up the client needs to connect to the CCJHub (SignalR). I have example code for this that can be added to HiddenWallet.

From this point onward the client will receive broadcasts from CCJ and via the hub when a phase change occurs. For example - when all inputs have been received and the next phase (output submission) needs to be actioned.

The MVC service accepts data via the api defined here: https://github.com/nopara73/HiddenWallet/blob/zerolink/HiddenWallet.Documentation/TumblerApiSpecs.md

It also has access to the single instance CCJ class and submits data received for processing. When certain criteria are hit the CCJ class will inform the SignalR server to issue a broadcast message to the connected clients which will move on to using MVC to action the next step.

Will merge into: HiddenWallet.ChaumianCoinJoin.Tumbler

@nopara73
Copy link
Contributor Author

Status report: This issue is half implemented. The client side is needed.

@wintercooled
Copy link
Contributor

wintercooled commented Oct 27, 2017

Working on the client now...
Will check when adding client code and connect over non-tor and keep the original connection alive when tor circuit is established/changed etc.

@wintercooled
Copy link
Contributor

Sample C# code here: https://github.com/wintercooled/HiddenWalletSignalRClient
Connects to HiddenWallet.ChaumianTumbler SignalR Hub and receives broadcasts.
(work in progress but it currently connects and receives broadcasts - need to add disconnect handling etc)

@nopara73
Copy link
Contributor Author

Awesome! Closing the issue.

nopara73 added a commit that referenced this issue Apr 9, 2018
soosr added a commit that referenced this issue Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants