-
Notifications
You must be signed in to change notification settings - Fork 72
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
fix: masks ip address in request details passed as argument to MN client #3268
base: main
Are you sure you want to change the base?
Conversation
Test Results 21 files - 1 281 suites - 10 35m 1s ⏱️ -41s For more details on these failures, see this check. Results for commit 7e24f26. ± Comparison against base commit b99655e. This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
packages/relay/src/lib/eth.ts
Outdated
@@ -1722,7 +1722,7 @@ export class EthImpl implements Eth { | |||
const formattedTransactionId = formatTransactionIdWithoutQueryParams(submittedTransactionId); | |||
const contractResult = await this.mirrorNodeClient.repeatedRequest( | |||
this.mirrorNodeClient.getContractResult.name, | |||
[formattedTransactionId, requestDetails], | |||
[formattedTransactionId], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking is this the only place to remove it?
Other approach is to set IP undefined after it's utilized in the rate limiter if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, its not the only place, i think there is one more, working on it
I will check your suggestion as well
d5db1d0
to
e0a7de0
Compare
e0a7de0
to
9302c27
Compare
Signed-off-by: Konstantina Blazhukova <[email protected]>
d4ff0f7
to
9e307bf
Compare
Signed-off-by: Konstantina Blazhukova <[email protected]>
9e307bf
to
7e24f26
Compare
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3268 +/- ##
==========================================
+ Coverage 76.64% 77.89% +1.25%
==========================================
Files 65 66 +1
Lines 4449 4470 +21
Branches 1014 1003 -11
==========================================
+ Hits 3410 3482 +72
+ Misses 672 613 -59
- Partials 367 375 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the quick great work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good but I won't if there is a single location we can set this oce
@@ -1720,9 +1721,16 @@ export class EthImpl implements Eth { | |||
if (submittedTransactionId) { | |||
try { | |||
const formattedTransactionId = formatTransactionIdWithoutQueryParams(submittedTransactionId); | |||
|
|||
// Create a modified copy of requestDetails | |||
const modifiedRequestDetails = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works but is there a place where we can do this once before it's passed into the eth.ts but after it's utilized locally?
Description:
The issue arises from the fact requestDetails are passed as an argument to the repeatedRequest method in MN client, because they are needed for the next method call
However, further down in the method the args are logged.
Related issue(s):
Fixes #3266