ElectrumABC icon indicating copy to clipboard operation
ElectrumABC copied to clipboard

Tracking CashFusion Errors

Open christroutner opened this issue 4 years ago • 6 comments

This Issue was created to track common errors seen while running CashFusion. This is a place to collect data and to discuss the trade-offs encountered while trying to mitigate errors.

christroutner avatar Jan 02 '21 02:01 christroutner

Screenshot from 2021-01-01 18-43-44

christroutner avatar Jan 02 '21 03:01 christroutner

The output above is from a Raspberry Pi 3 with 1GB of RAM. It's an underpowered device, but there are millions deployed around the world. If we can get CashFusion to run on these little devices, I think it will be a boon to adoption. There are privacy extensions to web wallets that could be built around such a device.

There seems to be a timeout error that is thrown after 15 - 20 seconds. If there is any way we could increase the timeout to 30 seconds, I think it would help these devices achieve more successful fusions. They do work, but fail more often than they succeed. They're just a little slow.

christroutner avatar Jan 02 '21 03:01 christroutner

OK, so that's the timeout parameter that causes this: COVERT_CONNECT_TIMEOUT https://github.com/Bitcoin-ABC/ElectrumABC/blob/master/electroncash_plugins/fusion/protocol.py#L52

Looking at the comment, I imagine that there are other parameters that should be changed accordingly if you touch this. Not sure yet if it is server params or client parameters. Can you try to test this and see if it causes side effects?

PiRK avatar Jan 03 '21 08:01 PiRK

I've increased the client-side timeouts, but they don't seem to have any impact to the chance of getting disconnected during a fusion, or the number of successful fusions.

From watching the logs, I believe the client is being disconnected from the server side. I think the next step for working towards improvement would be to increase the timeouts on the server side. In particular, I think this setting should be doubled: https://github.com/Bitcoin-ABC/ElectrumABC/blob/master/electroncash_plugins/fusion/protocol.py#L86

But if possible, all server-side timeouts in that file should be doubled. We can always bring them back down once we see more successful fusions.

christroutner avatar Jan 03 '21 16:01 christroutner

Screenshot from 2021-01-03 08-57-48

christroutner avatar Jan 03 '21 17:01 christroutner

I think the logs above capture a failure where the Tor connection took longer than 15 seconds to establish a connection and the client was disconnected from the server-side.

christroutner avatar Jan 03 '21 17:01 christroutner