ExchangeUnion / xud

Exchange Union Daemon 🔁 ⚡️
https://exchangeunion.com
GNU Affero General Public License v3.0
115 stars 44 forks source link

Trading Test Environment v2 #472

Closed kilrau closed 6 years ago

kilrau commented 6 years ago

Continuation of v1:

offerm commented 6 years ago

For SIMNET there should be one BTCD (or LTCD) running in the cloud. This BTCD serves all BTC-LNDs of all exchanges. There should be a script that mines a new block every few seconds. Do you see any issue with this setup?

requestChannel(LND URI, currency, amount) - I wouldn't add this to XUD itself. Instead, I suggest creating a script/standalone program that monitors the LND's channels and automatically opens an outgoing channel for every incoming channel. So, for example, if A connects to xud2 and creates a channel to xud2, xud2 will automatically create a channel back to A. This way swap can work in both directions.

You can also consider that A open and fund the channel with push_amt. This moves some of the funds to the xud1,2,3 side. It should work without any problem but it is less of a real life scenario

kilrau commented 6 years ago

Do you see any issue with this setup?

Not at all, sound great!, Updated description

kilrau commented 6 years ago

Any volunteers to work on that? @michael1011 @itsbalamurali

kilrau commented 6 years ago

Closed this one https://github.com/ExchangeUnion/xud/issues/508, you wanna take over? @offerm

kilrau commented 6 years ago

@michael1011 and me will work on https://github.com/ExchangeUnion/xud/issues/191 first, can you help us with this one after? @offerm

offerm commented 6 years ago

Update Continuation of v1:

3 VMs: xud1,2,3 all LND enabled (BTC/LTC), raiden disabled

done

1 separate VM: running one SIMNET BTCD and one SIMNET LTCD. BTCD serves all BTC-LNDs, LTCD serves all LTC-LNDs of xud1,2,3. There should be a script that mines a new block every 5 seconds.

done

public "requestChannel(LND URI, currency, amount)" method to call at xud1,2,3, (it's a separate script, not part of XUD) which triggers xud1,2,3 to open a channel back to me. Advanced: Automatically open an outgoing channel on the second currency with max capacity. We might only open this for whitelisted xud pubkeys to avoid abuse.

in the making by @michael1011

continous deployment: xud1,2,3 get updated automatically on latest master: idea -> dockerhub -> kubernetes pull new image, check kubernetes scripts in /test @itsbalamurali

Working on it