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

chore: update simnet images #385

Merged
31 commits merged into from
Apr 22, 2020
Merged

chore: update simnet images #385

31 commits merged into from
Apr 22, 2020

Conversation

reliveyy
Copy link
Collaborator

@reliveyy reliveyy commented Apr 7, 2020

This commit will update simnet environment to latest xud-simnet master

How to test?

Run xud script with -b chore/update-simnet then select simnet you should have latest xud-simnet experience (auto channel openning is included in this PR).

Closes #326
Reopen previous PR #346

@reliveyy reliveyy requested review from a user, michael1011 and kilrau April 7, 2020 14:57
@reliveyy reliveyy self-assigned this Apr 7, 2020
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we should also remove raiden from xud.conf.

exit_code, output = utils.exec_run("cat /var/log/launcher.log")
print(output.decode())

# exit_code, output = find("xud").exec_run("xucli --rpcport=18886 getinfo")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comment and not delete?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the part I've not planned well about which is revealing some useful debug information when the test fails. Anyway I well refine this part later.

@reliveyy reliveyy marked this pull request as draft April 9, 2020 09:46
@reliveyy reliveyy force-pushed the chore/update-simnet branch 4 times, most recently from f832f51 to dfe232a Compare April 12, 2020 05:04
@peartobear
Copy link

A more readable error state would be better (?)

Screenshot 2020-04-13 at 2 55 00 PM

@reliveyy
Copy link
Collaborator Author

reliveyy commented Apr 13, 2020

A more readable error state would be better (?)

@peartobear Sorry this PR is still pending becuase the our GCP simnet is still not ready.

❯ docker exec simnet_xud_1 xucli --rpcport 28886 connect 02b66438730d1fcdf4a4ae5d3d73e847a272f160fee2938e132b52cab0a0d9cfc6@xud1.simnet.exchangeunion.com:28885
Error: 2 UNKNOWN: Peer 02b66438730d1fcdf4a4ae5d3d73e847a272f160fee2938e132b52cab0a0d9cfc6@xud1.simnet.exchangeunion.com:28885 was destroyed

@kilrau kilrau added the P1 top priority label Apr 14, 2020
@reliveyy reliveyy force-pushed the chore/update-simnet branch from dfe232a to 648e3a6 Compare April 17, 2020 15:41
@kilrau
Copy link
Contributor

kilrau commented Apr 20, 2020

This is currently not fully working due to #419 (comment)

simnet > status
┌─────────┬──────────────────────────────────────────────────┐
│ SERVICE │ STATUS                                           │
├─────────┼──────────────────────────────────────────────────┤
│ lndbtc  │ Ready                                            │
├─────────┼──────────────────────────────────────────────────┤
│ lndltc  │ Ready                                            │
├─────────┼──────────────────────────────────────────────────┤
│ raiden  │ Container exited                                 │
├─────────┼──────────────────────────────────────────────────┤
│ xud     │ could not connect to xud at 0.0.0.0:28886, is xu │
└─────────┴──────────────────────────────────────────────────┘
simnet > getinfo
could not connect to xud at 0.0.0.0:28886, is xud running?

@kilrau kilrau marked this pull request as ready for review April 20, 2020 10:48
@kilrau
Copy link
Contributor

kilrau commented Apr 20, 2020

Last commit sets xud grpc listening address to 127.0.0.1, which magically turned the xud grpc listen on localhost instead of ::1 and xucli is working again:

bash-5.0# netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 0.0.0.0:28885           0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:28887           0.0.0.0:*               LISTEN      
tcp        0      0 localhost:9050          0.0.0.0:*               LISTEN      
tcp        0      0 127.0.0.11:46657        0.0.0.0:*               LISTEN      
tcp        0      0 localhost:54764         localhost:9050          ESTABLISHED 
tcp        0      0 localhost:28885         localhost:47438         ESTABLISHED 
tcp        0      0 xud:42842               lndltc:10009            ESTABLISHED 
tcp        0      0 localhost:47438         localhost:28885         ESTABLISHED 
tcp        0      0 localhost:9050          localhost:54764         ESTABLISHED 
tcp        0      0 localhost:9050          localhost:54668         ESTABLISHED 
tcp        0      0 xud:42772               lndbtc:10009            ESTABLISHED 
tcp        0      0 localhost:54668         localhost:9050          ESTABLISHED 
tcp        0      0 xud:45698               45.62.228.131:9001      ESTABLISHED 
tcp        0      0 localhost:28886         :::*                    LISTEN      
udp        0      0 127.0.0.11:58132        0.0.0.0:*                      

reliveyy added 11 commits April 21, 2020 17:32
This status will show when "xucli getinfo" got an error like:

/app/node_modules/yargs/yargs.js:1175
      else throw err
           ^

Error: ENOENT: no such file or directory, open '/root/.xud/tls.cert'
    at Object.openSync (fs.js:457:3)
    at Object.readFileSync (fs.js:359:35)
    at Object.exports.loadXudClient (/app/dist/cli/command.js:23:31)
    at Object.exports.handler (/app/dist/cli/commands/getinfo.js:69:15)
    at Object.runCommand (/app/node_modules/yargs/lib/command.js:237:40)
    at Object.parseArgs [as _parseArgs] (/app/node_modules/yargs/yargs.js:1090:30)
    at Object.get [as argv] (/app/node_modules/yargs/yargs.js:1024:21)
    at Object.<anonymous> (/app/bin/xucli:40:3)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/root/.xud/tls.cert'
}
@reliveyy reliveyy force-pushed the chore/update-simnet branch from 3dcb67d to f6d6903 Compare April 21, 2020 09:52
@kilrau
Copy link
Contributor

kilrau commented Apr 21, 2020

This commit moving all latest images together broke the auto create and auto unlock of xud.

simnet > status
┌─────────┬──────────────────────────────────────────────────┐
│ SERVICE │ STATUS                                           │
├─────────┼──────────────────────────────────────────────────┤
│ lndbtc  │ Ready                                            │
├─────────┼──────────────────────────────────────────────────┤
│ lndltc  │ Ready                                            │
├─────────┼──────────────────────────────────────────────────┤
│ raiden  │ Container exited                                 │
├─────────┼──────────────────────────────────────────────────┤
│ xud     │ Wallet locked. Unlock with xucli unlock.         │
└─────────┴──────────────────────────────────────────────────┘
simnet > unlock
Enter master xud password: 
no xud node exists to unlock, try creating one with 'xucli create' or 'xucli restore'

We could now try to bring things back, but I rather suggest we remove all simnet specific logic and have the regular create/write down mnemonic, set passwords, set backup location flow for simnet too, just like on testnet/mainnet. The only difference is, that channels come automatically and money is "for free".

@raladev
Copy link
Contributor

raladev commented Apr 21, 2020

it was decided to create separate issue for task in priveous comment, since it was easier to return autocreation and we did not want to block the merge by this comment. #425

@reliveyy reliveyy requested a review from a user April 22, 2020 10:53
@ghost ghost merged commit 6e0d101 into master Apr 22, 2020
@ghost ghost deleted the chore/update-simnet branch April 22, 2020 10:56
@kilrau kilrau mentioned this pull request Apr 22, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 top priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update xud-simnet
4 participants