Bitcoin-ABC / ElectrumABC

Mirror of https://reviews.bitcoinabc.org/source/bitcoin-abc/browse/master/electrum/
https://bitcoinabc.org/electrum
Other
32 stars 16 forks source link

Tracking CashFusion Errors #66

Open christroutner opened 3 years ago

christroutner commented 3 years ago

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 commented 3 years ago

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

christroutner commented 3 years ago

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.

PiRK commented 3 years ago

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?

christroutner commented 3 years ago

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 commented 3 years ago

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

christroutner commented 3 years ago

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.