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

Feature | Server Type #245

Merged
merged 11 commits into from
Dec 29, 2023
Merged

Feature | Server Type #245

merged 11 commits into from
Dec 29, 2023

Conversation

mrpalide
Copy link
Contributor

@mrpalide mrpalide commented Dec 28, 2023

Fixes #30

Changes:

  • add --auth flag to dmsg-discovery and dmsg-server, as simple authentication for recognize official dmsg servers
  • add --official-servers flag as list of official dmsg-servers separated by comma ,
  • add serverType field to *disc.Entry as type of dmsg server

How to test this PR:

  • run redis-server in default 6379 port

  • build on this PR's branch make build

  • run dmsg-discovery with --auth flag as ./bin/dmsg-discovery -t --auth 123

  • run a test dmsg-server with --auth flag and another without that flag as
    ./bin/dmsg-server start ./integration/configs/dmsgserver1.json --auth 123
    ./bin/dmsg-server start ./integration/configs/dmsgserver2.json

  • check dmsg discovery's all server endpoint in http://localhost:9090/dmsg-discovery/all_servers

  • should be something like this:
    image

  • run a test dmsg-server with --official-servers flag as ./bin/dmsg-discovery -t --official-servers 0297347088626e5d6468bc0ed258f2a5e7a279fae48b3636275220611c2eb01321

  • run dmsg-servers without any flag as
    ./bin/dmsg-server start ./integration/configs/dmsgserver1.json
    ./bin/dmsg-server start ./integration/configs/dmsgserver2.json

  • check dmsg discovery's all server endpoint again

  • should be something like this
    image

Note:
Old version of dmsg servers still available to register, but their type will set as community

@0pcom
Copy link
Collaborator

0pcom commented Dec 28, 2023

please create a file which contains the dmsg servers to be whitelisted and include it.

@mrpalide
Copy link
Contributor Author

please create a file which contains the dmsg servers to be whitelisted and include it.

No file, just simple string
./dmsg-discovery --official-servers pk1,pk2,pk3,...

Copy link
Collaborator

@0pcom 0pcom left a comment

Choose a reason for hiding this comment

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

looks good

@0pcom 0pcom merged commit 6351a24 into skycoin:develop Dec 29, 2023
3 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants