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

set rewards address per visor / display node ip with privacy.json #1361

Closed
0pcom opened this issue Sep 17, 2022 · 3 comments
Closed

set rewards address per visor / display node ip with privacy.json #1361

0pcom opened this issue Sep 17, 2022 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@0pcom
Copy link
Collaborator

0pcom commented Sep 17, 2022

  • a new file will be created by skywire-cli to persist the user chosen settings regarding privacy and rewards of the user/node
  • the file will be JSON encoded and placed in ./local/privacy.json
  • if the file is not found, it will be generated by the visor with private defaults
  • the file will have the following fields
// privacy.json file with private defaults
// default for reward_address is an empty string
{
    "displayNodeIP" : false,
    "reward_address" : "AG8Ray2A6sLqi6MiEJ2ecAYP4qxeEjbkoc"
}
  • upon startup the visor sends uptime requests to the uptime-tracker as usual but additionally includes a query to indicate whether the associated IPs geolocation can be displayed publically by the node-visualizer

  • the hypervisor API needs to support two new methods related to the privacy settings file

    • GET /visors/{pubkey}/privacy
    • PUT /visors/{pubkey}/privacy
      • the request will accept a JSON encoded request body that will contain the new settings to be placed in privacy.json
      • depending on whether we read in the privacy file on every request to the uptime tracker or only on startup these changes will take effect within an interval of 5 minutes or upon a restart

We should consider a framework by which a user can set a master public key (bip44)
it is preferable that the address contained in privacy.json is one derived from a bip44 master public key. We should additionally consider support for setting this master public key (not in the same file, perhaps in the main config file)

@0pcom
Copy link
Collaborator Author

0pcom commented Sep 25, 2022

#1369 has everything except the hypervisor api endpoints for this, currently

@0pcom 0pcom added the enhancement New feature or request label Sep 25, 2022
@ersonp ersonp mentioned this issue Oct 7, 2022
@0pcom
Copy link
Collaborator Author

0pcom commented Oct 19, 2022

PR#1391 reimplements this using a flat file reward.txt containing the reward address. This file is not json formatted. Reasoning explained in the PR.

An accompanying change in the struct of the visor is being implemented by erson. My pull request does little more than rearrange the cli interface to reflect the changes in reward and node privacy settings.

it is required to have displaynodeip as a part of the visor's conf and transmitted to the services in order for the service (discovery) to immediately reflect this setting.

@0pcom
Copy link
Collaborator Author

0pcom commented Nov 15, 2022

This feature is now documented here

@0pcom 0pcom closed this as completed Nov 15, 2022
@0pcom 0pcom added this to the Milestone 8 milestone Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant