Web: The reporter API is down

Created on 3 Dec 2020  路  10Comments  路  Source: gitcoinco/web

All 10 comments

@guanbinrui How are you calling the API? put headers?
https://gitcoin.co/api/v0.1/grants/report/?eth_address=0x9531C059098e3d194fF87FebB587aB07B30B1306

Here is the last change in that call:
https://github.com/gitcoinco/web/pull/6830

@guanbinrui I believe the system is intermittent because the new round of Grants has started, it must be having a lot of calls per second. Ideal is Gitcoin making a subGraph for Grants requests

@developerfred Hi thanks for the quick response.

Here is my request:

> GET /api/v0.1/grants/report/?eth_address=0x9531C059098e3d194fF87FebB587aB07B30B1306 HTTP/2
> Host: gitcoin.co
> User-Agent: xxx
> Accept: */*

I never had a successful response today. I will try it later.

@developerfred Hi thanks for the quick response.

Here is my request:

> GET /api/v0.1/grants/report/?eth_address=0x9531C059098e3d194fF87FebB587aB07B30B1306 HTTP/2
> Host: gitcoin.co
> User-Agent: xxx
> Accept: */*

I never had a successful response today. I will try it later.

I got it. I forget to put timestamp params for the new ver.

Hi @developerfred I'm afraid it's a bug so I have to reopen this issue.

I found those timestamp params are optional and the address (0xC0eBeFadCbF1d2A85fBfDDC226a95860F5152b5f) from #6830 still works without them.

I tested some addresses on this API. The below addresses not working for me.

  • 0xC0eBeFadCbF1d2A85fBfDDC226a95860F5152b5f
  • 0x9531C059098e3d194fF87FebB587aB07B30B1306

And here is how we use this API: Gitcoin Service.

We depend on /api/v0.1/grants/{{ grant_id }}/ and /api/v0.1/grants/report/?eth_address={{ address }} to present a card like:

test

Thanks @guanbinrui, we need to analyze these requests to see what is broken, this could be a possible API attack

@thelostone-mc @owocki it is possible to check how the grant endpoint access is, I believe that we are having some kind of unwanted requests.

I believe that the ideal solution now is to create a whitelist of authorized addresses that can call the grants api or add a token. for each client that uses the api.

@guanbinrui I made a subgraph with the Grants events.

Gitcoin Grants Subgraph
Playground

I will add new queries, it will serve as a query.

@guanbinrui I made a subgraph with the Grants events.

Gitcoin Grants Subgraph
Playground

I will add new queries, it will serve as a query.

That's cool. The reporter API is working now. We will move to the graph queries later if it covered our use case. Thanks!

hey all - are you going to continue using the API api/v0.1/grants/report/?eth_address=0x9531C059098e3d194fF87FebB587aB07B30B1306 ? it seems super slow (i'm seeing 30s - 50s processes on our servers from this), causing performance degradations on gitoin's side as they pile up. im wondering if a performance-centric reafctor is possible, and if not if it'd be possible to retire this API?

hey all - are you going to continue using the API api/v0.1/grants/report/?eth_address=0x9531C059098e3d194fF87FebB587aB07B30B1306 ? it seems super slow (i'm seeing 30s - 50s processes on our servers from this), causing performance degradations on gitoin's side as they pile up. im wondering if a performance-centric reafctor is possible, and if not if it'd be possible to retire this API?

Using gitcoin-grants-subgraph and possible to consult this information. If we leave the internal api more focused on just sending tips and using the subgraph for consultation, we will gain a lot in performance.

It looks like this endpoint has some heavy queries & it was maxing out our CPU utilization
We've updated the endpoint to return no data for now cause it's affecting the overall usage of the sites

refactor is def needed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kuhnchris picture kuhnchris  路  4Comments

christianbundy picture christianbundy  路  3Comments

frankchen07 picture frankchen07  路  4Comments

ghost picture ghost  路  3Comments

Skyge picture Skyge  路  3Comments