Closed m-Peter closed 2 months ago
[!CAUTION]
Review failed
The pull request is closed.
The recent updates enhance the rate limiting mechanism by refining client identification through the use of the HTTP.Origin
header, which improves clarity for web-based applications. In the tests, functionality has shifted to a structured error handling approach for rate limits, simplifying checks by focusing solely on failed requests. Additionally, a new HTTP header ensures compliance with CORS policies, contributing to a more robust and reliable testing process.
Files | Change Summary |
---|---|
api/ratelimiter.go |
Modified rateLimit function to use HTTP.Origin for client identification and updated logging. |
tests/web3js/eth_rate_limit_test.js |
Replaced direct RPC calls with a helper function; focused on counting failed requests only. |
tests/web3js/helpers.js |
Added Origin header to callRPCMethod for enhanced request context and CORS compliance. |
In the meadow where bunnies play,
Changes come in a joyful way.
With origins clear, like the morning dew,
Rate limits now shine, fresh and new!
Hop along, let errors be few,
Testing's a dance, and we're hopping too! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
The regression occurred in https://github.com/onflow/flow-evm-gateway/commit/2eb7ada78de926eddb52f9753e7c6ce89db7b233. Previously,
would return
"NA"
, for an emptyRemote
. See: https://github.com/onflow/go-ethereum/blob/master/signer/core/api.go#L196But the new version:
simply returns
""
for an emptyRemote
.So we need to check:
For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes
Chores
Origin
HTTP header in test requests to comply with CORS policies.