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

feat(AMD Cert): Always fetch from CORS #428

Conversation

Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Apr 15, 2024

Description

AMD certificate endpoints are rate limited, so we are going to always use our Lit CORS server caches certificates locally to avoid hitting the rate limit.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Test Command

DEBUG=true yarn test:e2e:node --filter=multi-network          

Result

image

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Ansonhkg Ansonhkg requested a review from joshLong145 as a code owner April 15, 2024 17:13
@Ansonhkg Ansonhkg requested a review from joshLong145 April 15, 2024 17:22
joshLong145
joshLong145 previously approved these changes Apr 15, 2024
Copy link
Contributor

@MaximusHaximus MaximusHaximus left a comment

Choose a reason for hiding this comment

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

Added a few things in-line 💖

Just out of curiosity, do we know what the rate limits are or how they are enforced (e.g. by IP address?).

packages/crypto/src/lib/crypto.ts Show resolved Hide resolved
packages/crypto/src/lib/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/lib/crypto.ts Outdated Show resolved Hide resolved
packages/crypto/src/lib/crypto.ts Outdated Show resolved Hide resolved
Ansonhkg and others added 4 commits April 15, 2024 20:10
Co-authored-by: Daryl Collins <daryl@litprotocol.com>
Signed-off-by: Anson <ansonox@gmail.com>
@joshLong145 joshLong145 self-requested a review April 15, 2024 19:53
@Ansonhkg Ansonhkg requested a review from MaximusHaximus April 16, 2024 16:00
Copy link
Contributor

@MaximusHaximus MaximusHaximus left a comment

Choose a reason for hiding this comment

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

👍 LGTM! 🚢 :shipit:

@Ansonhkg Ansonhkg merged commit 1286138 into master Apr 16, 2024
4 checks passed
@Ansonhkg Ansonhkg deleted the feature/lit-2915-js-sdk-always-get-the-amdcert-from-the-lit-cos-proxy branch April 16, 2024 16:21
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.

3 participants