livepeer / livepeer-monorepo

JavaScript tools and applications that interact with Livepeer's smart contracts and peer-to-peer network
https://livepeer.org
MIT License
166 stars 71 forks source link

add new regions #1018

Closed adamsoffer closed 3 years ago

adamsoffer commented 3 years ago

This PR adds 4 additional regions to the performance leaderboard:

NYC -> New York City LAX -> Los Angeles LON -> London PRG -> Prague

Closes #1013

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

explorer-mainnet – ./packages/explorer-2.0

🔍 Inspect: https://vercel.com/livepeerorg/explorer-mainnet/4hCJ2RJqrrjJrg1Fj33EHL1x9mj4
✅ Preview: https://explorer-mainnet-git-as-new-regions-livepeerorg.vercel.app

explorer-rinkeby – ./packages/explorer-2.0

🔍 Inspect: https://vercel.com/livepeerorg/explorer-rinkeby/4PEoWak6ysjRKWti2wMPTQZg4YPA
✅ Preview: https://explorer-rinkeby-git-as-new-regions-livepeerorg.vercel.app

yondonfu commented 3 years ago

Looks like there is a problem with sorting for a few regions.

For Singapore:

Screen Shot 2021-08-27 at 2 18 42 PM

Screen Shot 2021-08-27 at 2 18 34 PM

adamsoffer commented 3 years ago

@yondonfu just pushed up a UI fix.

yondonfu commented 3 years ago

NYC shows all zero scores:

Screen Shot 2021-08-27 at 3 35 20 PM

But, when I curl the leaderboard API directly, I see non-zero scores:

curl https://leaderboard-serverless.vercel.app/api/aggregated_stats\?region\=NYC\&since\=1630006475 | jq .
{
  "0x00803b76dc924ceabf4380a6f9edc2ddd3c90f38": {
    "NYC": {
      "success_rate": 0,
      "round_trip_score": 0,
      "score": 0
    }
  },
  "0x02b6aac33a397aaadee5227c70c69bb97f2cc529": {
    "NYC": {
      "success_rate": 1,
      "round_trip_score": 0.9855847303730806,
      "score": 0.9855847303730806
    }
  },
  "0x04c670b89907d9740c2f8683e397096d040b0682": {
    "NYC": {
      "success_rate": 0,
      "round_trip_score": 0,
      "score": 0
    }
  },
  "0x088fe56a58c11f86d63037552f0fe7f191d3aa1b": {
    "NYC": {
      "success_rate": 0,
      "round_trip_score": 0,
      "score": 0
    }
  },
  "0x0eed95c0a5d78c83033fe8a28dde67e5daac62db": {
    "NYC": {
      "success_rate": 0,
      "round_trip_score": 0,
      "score": 0
    }
  },
  "0x0fc80afb7876f579f1fb1c4d1c37cf1339038658": {
    "NYC": {
      "success_rate": 0,
      "round_trip_score": 0,
      "score": 0
    }
  },
  "0x10742714f33f3d804e3fa489618b5c3ca12a6df7": {
    "NYC": {
      "success_rate": 1,
      "round_trip_score": 0.7540124315455368,
      "score": 0.7540124315455368
    }
  },
  "0x10b21af759129f32c6064adfb85d3ea2a8c0209c": {
    "NYC": {
      "success_rate": 1,
      "round_trip_score": 0.7365042868801648,
      "score": 0.7365042868801648
    }
},

...
yondonfu commented 3 years ago

Noticed that the explorer queries https://leaderboard-serverless.livepeerorg.vercel.app here, but my curl request in this comment drops the "livepeerorg" from the URL.

adamsoffer commented 3 years ago

@yondonfu I'm seeing scores in all the regions now.

adamsoffer commented 3 years ago

Also, any idea why we were using that other leaderboard API URL before and not the one that was added in the latest commit?

I think I just wasn't aware of the cleaner URL at the time. Both of those domains should technically point to the same Vercel deployment so a bit odd they're returning different results 🤔

Screen Shot 2021-08-28 at 12 55 19 PM
adamsoffer commented 3 years ago

Ah I think I know why. So https://leaderboard-serverless.livepeerorg.vercel.app and https://leaderboard-serverless.vercel.app both point to the latest production deployment. https://leaderboard-serverless-livepeerorg.vercel.app used to point to the latest production deployment, but Vercel changed their autogenerated url structure.