basicswap / basicswap

Basic Atomic Swap Proof of Concept
MIT License
173 stars 42 forks source link

Docker image can no longer boot after running `--disablecoin` #87

Open 2004seraph opened 3 months ago

2004seraph commented 3 months ago

Following the docker instructions for Linux gets the app up and running flawlessly. However, when trying to disable the particl coin with --disablecoin=particl after initial installation, the app throws the following error:

swapclient-1  | INFO:root:Using datadir: /coindata
swapclient-1  | INFO:root:Chain: mainnet
swapclient-1  | INFO:root:basicswap-run, version: 0.13.0
swapclient-1  |
swapclient-1  |
swapclient-1  | 2024-05-20 01:59:29 INFO : Network: mainnet
swapclient-1  | 2024-05-20 01:59:29 INFO : Starting Monero wallet daemon
swapclient-1  | 2024-05-20 01:59:29 DEBUG : 'trusted_daemon' setting for Monero: auto.
swapclient-1  | 2024-05-20 01:59:29 INFO : daemon-address: node.xmr.to:18081 (untrusted)
swapclient-1  | INFO:root:Starting wallet daemon /coindata/bin/monero/monero-wallet-rpc --wallet-dir=/coindata/monero
swapclient-1  | 2024-05-20 01:59:29 INFO : Started monero-wallet-rpc 16
swapclient-1  | 2024-05-20 01:59:29 INFO : Starting Litecoin daemon
swapclient-1  | INFO:root:Starting node /coindata/bin/litecoin/litecoind -datadir=/coindata/litecoin
swapclient-1  | 2024-05-20 01:59:29 INFO : Started litecoind 17
swapclient-1  | 2024-05-20 01:59:29 INFO : Starting BasicSwap 0.13.0, database v23
swapclient-1  |
swapclient-1  |
swapclient-1  | 2024-05-20 01:59:29 INFO : Python version: 3.10.12
swapclient-1  | 2024-05-20 01:59:29 INFO : SQLAlchemy version: 1.4.39
swapclient-1  | 2024-05-20 01:59:29 INFO : Timezone offset: 0 (GMT)
swapclient-1  | 2024-05-20 01:59:29 DEBUG : Reading LTC rpc credentials from auth cookie /coindata/litecoin/.cookie
swapclient-1  | 2024-05-20 01:59:29 WARNING : Error, iteration 0: [Errno 2] No such file or directory: '/coindata/litecoin/litecoind.pid'
swapclient-1  | 2024-05-20 01:59:30 INFO : Litecoin Core version 210300
swapclient-1  | 2024-05-20 01:59:30 DEBUG : New LTC block at height: 0
swapclient-1  | Traceback (most recent call last):
swapclient-1  |   File "/usr/local/lib/python3.10/dist-packages/bin/basicswap_run.py", line 241, in runClient
swapclient-1  |     swap_client.start()
swapclient-1  |   File "/usr/local/lib/python3.10/dist-packages/basicswap/basicswap.py", line 791, in start
swapclient-1  |     is_encrypted, _ = self.getLockedState()
swapclient-1  |   File "/usr/local/lib/python3.10/dist-packages/basicswap/basicswap.py", line 7390, in getLockedState
swapclient-1  |     self._is_encrypted, self._is_locked = self.ci(Coins.PART).isWalletEncryptedLocked()
swapclient-1  |   File "/usr/local/lib/python3.10/dist-packages/basicswap/basicswap.py", line 634, in ci
swapclient-1  |     raise InactiveCoin(int(coin))
swapclient-1  | basicswap.util.InactiveCoin: 1
swapclient-1  | 2024-05-20 01:59:30 INFO : Finalise
swapclient-1  | 2024-05-20 01:59:30 INFO : Stopping HTTP threads.
swapclient-1  | 2024-05-20 01:59:30 INFO : Interrupting 16
swapclient-1  | 2024-05-20 01:59:30 INFO : Interrupting 17
swapclient-1  | INFO:root:Done.
swapclient-1 exited with code 0

I am also unable to run --addcoin for any currency after disabling a coin, it gets stuck with this error:

2024-05-20 02:02:31 WARNING : Can't connect to PART RPC: 'interface'.

The installation seems to completely break, the only fix I have found is purging the coinswaps directory and rebuilding the docker image.

nahuhh commented 3 months ago
  1. Are you able to re-add particl with --addcoin?
  2. If not, is Particl still in basicswap.json? if so, set "connection type" from "none" to "rpc" and change "manage daemon" from "false" to "true"

particl is required

All other coins are derived from the particl keys

2004seraph commented 3 months ago

Ah I understand now. I was not able to re-add particl using that argument due to it throwing raise InactiveCoin(int(coin)). Do you know of anyway I can use this excellent app without having to sync the particl blockchain on my laptop with very limited storage space?

nahuhh commented 2 months ago

@2004seraph sorry, i missed your update

no. At current, you have to run a particl blockchain for the orderbook relay (smsg), and you have to run a blockchain for any coin that you want to use (aside from xmr and wow).

particl is only about 2.2gb