Блог пользователя AdityaM-IITH

Автор AdityaM-IITH, история, 4 часа назад, По-английски

It’s been about two months since Carrot and the CF predictors broke during live contests. Has anyone heard from the extension devs if a fix is coming, or are the recent API/server changes permanent? Doing these rounds completely blind is starting to get old.

  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится

»
3 часа назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

I just tried Carrot again and it's working again. That's great!

  • »
    »
    2 часа назад, скрыть # ^ |
     
    Проголосовать: нравится +1 Проголосовать: не нравится

    Ah nice, just reset my local settings and it's connecting perfectly for me too now. Thanks for the heads up!

»
48 минут назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

We got message from Mike himself:

Hi. This change was made by me, so let me explain what happened. **** Originally, contest.standings worked for regular public contests with quite a lot of functionality. Unfortunately, this method is much heavier than it may look from outside. It is not always just “read standings from a table and return JSON”. Depending on the request, it may involve current virtual participants of the requester, practice submissions, filtering/paging, and then return a pretty large response. **** Recently this endpoint started to be used much more heavily by automated tools/scripts. I also suspect that some of this traffic came from AI/research-related usage. As a result, the whole site could become noticeably slower, because Codeforces had to calculate and return too much data too often. **** A few weeks ago I reacted by heavily restricting this method. In particular, I removed access to regular public contest standings through this API for ordinary users. This did break tools like Carrot, CF-Predictor, and similar extensions. I understand that it was unpleasant for users who relied on them. **** Today I made the restriction softer and changed the behavior to a compromise. **** For gym and mashup contests, contest.standings is available only through an authenticated API request from a user who can view the contest. Optional parameters may still be used there. **** For regular contests, ordinary and anonymous users can request standings only for public contests, and only by an anonymous GET request with exactly one query parameter: contestId. **** So for public regular contests, please use: **** https://mirror.codeforces.com/api/contest.standings?contestId= **** The response for such requests is cached for a short time, usually around 1–3 minutes. This should be much safer for the site and, I hope, should be enough for tools like Carrot, CF-Predictor, and similar extensions, as long as they only need public standings by contest id. **** If some tool currently sends an authenticated/signed request or passes extra parameters for regular contests, it will probably need to be adjusted to use the simple anonymous URL above. **** I don't currently have a technical way to keep the old fully-functional API behavior without risking performance degradation of the whole site. So this is not a full rollback to the old behavior, but an attempt to return the most useful part in a safe form. **** Sorry for the breakage. I'll watch how this compromise works in practice.