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

Use different database paths for different blockchains #1328

Closed
hackaugusto opened this issue Mar 29, 2018 · 2 comments
Closed

Use different database paths for different blockchains #1328

hackaugusto opened this issue Mar 29, 2018 · 2 comments
Assignees

Comments

@hackaugusto
Copy link
Contributor

Raiden must not assume that the running blockchain client is always connected to the same network. Raiden can handle different networks by:

  1. notifying the user about the mismatch and quitting
  2. using different database paths for different networks

The first option is a bit problematic because it makes unecessarily annoying to use different networks, so I propose the use of option 2 with a message on the command line about the current used network.

@hackaugusto hackaugusto changed the title Use different database paths for blockchains Use different database paths for different blockchains Mar 29, 2018
@hackaugusto
Copy link
Contributor Author

Note: This implies that if a user wants to run raiden on multiple blockchains, than multiple processes need to be run, which IMO it's fine as long as it doesn't want to do token swaps across chains.

@LefterisJP
Copy link
Contributor

LefterisJP commented Apr 2, 2018

Yeah option 2 is fine. But how would that work?

You connect to the ethereum client at the specified eth-rpc-endpoint and then you get the network id with the net_version RPC call and thus you know the network id and the directory for the DB to read/write to.

No extra arguments needed from the user, just keeping separate DB directories.

If the above as I understand it are the requirements I will just implement it in the morning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants