Support custom "sticky" lite server #5

Open
opened 1 year ago by jahway603 · 5 comments
jahway603 commented 1 year ago
Collaborator

Currently the code only supports a single hardcoded lightwalletd URL of lite2.hushpool.is. We want to have the same feature of SDL which let's us "sticky" (or force) the wallet to always use the same SDL lite server we configure.

Currently the code only supports a single hardcoded lightwalletd URL of `lite2.hushpool.is`. We want to have the same feature of SDL which let's us "sticky" (or force) the wallet to always use the same SDL lite server we configure.
fekt commented 1 year ago
Collaborator

I have tested previously with lite.hushpool.is but haven't verified if it stays on restarts or reverts back. The server could be saved as a preference when changing and then always use that value if a value exists.

I have tested previously with `lite.hushpool.is` but haven't verified if it stays on restarts or reverts back. The server could be saved as a preference when changing and then always use that value if a value exists.
fekt commented 1 year ago
Collaborator

I just tested if changing the server reverts on a restart and it did not. Looking at the code here, it already saves a server change in the preferences and will use the preference if changing from the default.
https://git.hush.is/hush/SilentDragonAndroid/src/branch/main/app/src/main/java/cash/z/ecc/android/ui/settings/SettingsViewModel.kt#L27

All preferences are also encrypted.

I just tested if changing the server reverts on a restart and it did not. Looking at the code here, it already saves a server change in the preferences and will use the preference if changing from the default. https://git.hush.is/hush/SilentDragonAndroid/src/branch/main/app/src/main/java/cash/z/ecc/android/ui/settings/SettingsViewModel.kt#L27 All preferences are also encrypted.
duke commented 1 year ago
Owner

@jahway603 does this satisfy your stickiness requirement? If you change the server, it will stay on that server. Since there is no logic to try multiple servers, I think "sticky" lite server is currently implemented, correct?

@jahway603 does this satisfy your stickiness requirement? If you change the server, it will stay on that server. Since there is no logic to try multiple servers, I think "sticky" lite server is currently implemented, correct?
Poster
Collaborator

@duke this fits the requirement but I wonder if implementing #1 will change this "sticky" behavior. I'm thinking of how SDL has a setting that will make sure nothing in the app will change the SDL server being used.

@duke this fits the requirement but I wonder if implementing https://git.hush.is/hush/SilentDragonAndroid/issues/1 will change this "sticky" behavior. I'm thinking of how SDL has a setting that will make sure nothing in the app will change the SDL server being used.
duke commented 1 year ago
Owner

@jahway603 yes, if #1 is implemented, we will also need a boolean option for "sticky server" which will prevent the wallet from trying any other server other than the one configured.

@fekt I propose that all options which most users might want to use go on the screen where we currently have the lightwalletd server + port. I think "sticky server" is probably an "Advanced" option, as most users will want the code to try various servers. The "sticky server" option seems to be most used by lightwalletd devs and sysadmins to test a specific server.

I propose that at the bottom of the current options screen, where we have server+port, we have a link to Advanced Options, which most users will not need to touch.

@jahway603 yes, if #1 is implemented, we will also need a boolean option for "sticky server" which will prevent the wallet from trying any other server other than the one configured. @fekt I propose that all options which most users might want to use go on the screen where we currently have the lightwalletd server + port. I think "sticky server" is probably an "Advanced" option, as most users will want the code to try various servers. The "sticky server" option seems to be most used by lightwalletd devs and sysadmins to test a specific server. I propose that at the bottom of the current options screen, where we have server+port, we have a link to Advanced Options, which most users will not need to touch.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.