-
Notifications
You must be signed in to change notification settings - Fork 77
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: improved preemtive rate limit for file transactions #2922
feat: improved preemtive rate limit for file transactions #2922
Conversation
6fd9899
to
ec0904e
Compare
16f93e4
to
9150900
Compare
3a29b5e
to
d26375d
Compare
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.
Looks good, a couple of questions and nits
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.
LG.
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.
Btw, when I come to think about those fees we use from the hedera fee calculator - aren't those estimates for the whole fee of the transaction? What part of that is paid by the relay operator? Isn't most of that paid by the signer of the transaction? Are you sure that those estimates reflect what is actually being paid by the relay operator - please add an acceptance test that verifies the estimates are accurate by comparing the difference in the operator's balance after performing the transaction to the result from the estimateFileTransactionFee
.
c8eaf17
to
1add014
Compare
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
52f79be
to
a431881
Compare
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2922 +/- ##
==========================================
+ Coverage 89.32% 89.92% +0.59%
==========================================
Files 56 58 +2
Lines 3832 3900 +68
Branches 774 779 +5
==========================================
+ Hits 3423 3507 +84
+ Misses 362 346 -16
Partials 47 47
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Description:
A preemptive rate limit was introduced as a hotfix in version 0.52.1, using a logic that preemptively rate-limited file transactions by comparing a hard-coded amount of tinybars that was assumed to be the cost for
FileCreate
andFileAppend
transactions. However, this logic was incorrect and the tinybar amount was a random figure agreed among the team for the purposes of the hotfix.This PR improves the rate-limiting logic by leveraging the Hedera Fee Calculator to estimate fees for
FileCreate
andFileAppend
transactions based on a file size ofFILE_APPEND_CHUNK_SIZE
bytes. This approach ensures the estimated fees more closely align with the actual transaction fees charged for these transactions.Fixes #2921
Notes for reviewer:
Checklist