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

Is the api.clio.one/htopology API used in TopologyUpdater maintained on GitHub? #784

Closed
robinboening opened this issue Feb 16, 2021 · 5 comments

Comments

@robinboening
Copy link

robinboening commented Feb 16, 2021

Hey folks 👋

can anyone point me to a GitHub repo for the api.clio.one/htopology API? Its used by the topologyUpdater.sh script hosted in this repository here. https://github.com/cardano-community/guild-operators/blob/alpha/scripts/cnode-helper-scripts/topologyUpdater.sh#L135-L136

I expected the repo for the API to be hosted on the https://github.com/clio-one account, but I didn't find it there.

Not am I only interested in the algorithm how it returns peers but I also believe I found a bug I'd like to report / fix:

The response body contains invalid JSON if you send a request including the customPeers parameter from a (yet) unregistered IP.

Thank you!
Robin

@robinboening robinboening changed the title Is the api.clio.one/htopology API which is used in TopologyUpdater maintained on GitHub? Is the api.clio.one/htopology API used in TopologyUpdater maintained on GitHub? Feb 16, 2021
@gufmar
Copy link
Contributor

gufmar commented Feb 16, 2021

Hello

First thank you for pointing this out. It is already fixed now, and was online for around 24h after I added support for some additional testnets.

For explanation: the topologyUpdater was never intended to run for such a long time and for so many users. the idea was to have a quick hack and time saving solution for the first couple of weeks after shelley mainnet launch (august 2020)

so currently there is no public repository for this. I still await the testdrive and introduction of P2P. But may also think about a complete re-implementation in Python and by using an unlicensed SQL database server.

@gufmar gufmar closed this as completed Feb 16, 2021
@robinboening
Copy link
Author

robinboening commented Feb 16, 2021

Thank you @gufmar, for the fast response and the explanation!

It is already fixed now

Is your fix online already? I still receive the invalid JSON for a request like this one: https://api.clio.one/htopology/v1/fetch/?max=15&magic=234567865&customPeers=1.2.3.4:3001

You'll see the Producers array includes two objects, but the comma is missing.

# https://api.clio.one/htopology/v1/fetch/?max=15&magic=234567865&customPeers=1.2.3.4:3001

{
  "resultcode": "402",
  "datetime":"2021-02-16 23:12:26",
  "clientIp": "x.xxx.xxx.xxx", "iptype": 4,
  "msg": "IP is not (yet) allowed to fetch this list", 
  "Producers": [   { "addr": "1.2.3.4", "port": 3001, "valency": 1 }  { "addr": "relays-new.cardano-mainnet.iohk.io", "port": 3001, "valency": 2, "debug":"default fallback result" } ]
 }

@gufmar
Copy link
Contributor

gufmar commented Feb 16, 2021

sorry, I forgot to save, saw it around 10 minutes ago. is now definitively online

@robinboening
Copy link
Author

🎉 thank you!

@tdiesler
Copy link

tdiesler commented Feb 17, 2021

Great work - thanks. This is related to IntersectMBO/cardano-node#2362

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

3 participants