-
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: transaction with CONTRACT_NEGATIVE_VALUE
breaks some routes
#3387
feat: transaction with CONTRACT_NEGATIVE_VALUE
breaks some routes
#3387
Conversation
Signed-off-by: nikolay <[email protected]>
Test Results 18 files - 4 236 suites - 35 33m 0s ⏱️ - 32m 43s Results for commit 24e6f30. ± Comparison against base commit 373f1dc. This pull request removes 4 and adds 9 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
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.
Great work overall. Blocking as one warning needed to be addressed.
Also, is it feasible to add an e2e test to avoid regression?
Signed-off-by: nikolay <[email protected]>
Adding an e2e test is not a straightforward process because that kind of revert can't be reproduced with an I have no problem adding that test if you insist 🚀 🙏. |
Ah I see. Just curious how would you reproduice the problem? |
Signed-off-by: nikolay <[email protected]>
Sending a negative amount via ContractCallTransaction will be enough while it accepts int64 (not uint64). Here is the link to the doc https://docs.hedera.com/hedera/sdks-and-apis/hedera-api/readme-1-1/contractcall#contractcalltransactionbody. |
Ah I see. So if it's feasible and do not take crazy amount of time, I would encourage we have an e2e just to make sure no regression later. Thanks much Nikki! |
Signed-off-by: nikolay <[email protected]>
At the least we could mock the CN response that would cause this and have an integration test that ensures the relay responds as expected. |
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
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.
Great work overall! Left some comments and suggestions
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
|
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 1 nit
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3387 +/- ##
==========================================
+ Coverage 84.18% 85.41% +1.23%
==========================================
Files 69 69
Lines 4711 4753 +42
Branches 1048 1059 +11
==========================================
+ Hits 3966 4060 +94
+ Misses 428 396 -32
+ Partials 317 297 -20
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…3387) * chore: handle contract negative value calls Signed-off-by: nikolay <[email protected]> * chore: remove .only Signed-off-by: nikolay <[email protected]> * chore: fix comments Signed-off-by: nikolay <[email protected]> * chore: edit imports Signed-off-by: nikolay <[email protected]> * chore: resolving comments Signed-off-by: nikolay <[email protected]> * chore: fix json parsing Signed-off-by: nikolay <[email protected]> * chore: add e2e test Signed-off-by: nikolay <[email protected]> * chore: fix test Signed-off-by: nikolay <[email protected]> * chore: fix test Signed-off-by: nikolay <[email protected]> * chore: fix flaky test Signed-off-by: nikolay <[email protected]> * chore: tests Signed-off-by: nikolay <[email protected]> * chore: try to disable the test Signed-off-by: nikolay <[email protected]> * chore: add test Signed-off-by: nikolay <[email protected]> * chore: resolve comments Signed-off-by: nikolay <[email protected]> * chore: simplify the tests Signed-off-by: nikolay <[email protected]> --------- Signed-off-by: nikolay <[email protected]>
…3387) * chore: handle contract negative value calls Signed-off-by: nikolay <[email protected]> * chore: remove .only Signed-off-by: nikolay <[email protected]> * chore: fix comments Signed-off-by: nikolay <[email protected]> * chore: edit imports Signed-off-by: nikolay <[email protected]> * chore: resolving comments Signed-off-by: nikolay <[email protected]> * chore: fix json parsing Signed-off-by: nikolay <[email protected]> * chore: add e2e test Signed-off-by: nikolay <[email protected]> * chore: fix test Signed-off-by: nikolay <[email protected]> * chore: fix test Signed-off-by: nikolay <[email protected]> * chore: fix flaky test Signed-off-by: nikolay <[email protected]> * chore: tests Signed-off-by: nikolay <[email protected]> * chore: try to disable the test Signed-off-by: nikolay <[email protected]> * chore: add test Signed-off-by: nikolay <[email protected]> * chore: resolve comments Signed-off-by: nikolay <[email protected]> * chore: simplify the tests Signed-off-by: nikolay <[email protected]> --------- Signed-off-by: nikolay <[email protected]> Revert "feat: transaction with `CONTRACT_NEGATIVE_VALUE` breaks some routes (#3387)" This reverts commit 8bc3991. Reapply "feat: transaction with `CONTRACT_NEGATIVE_VALUE` breaks some routes (#3387)" This reverts commit 8d52b9a07a43cecd6241eaa9a7f2e65c4df8d4e5.
…3387) * chore: handle contract negative value calls Signed-off-by: nikolay <[email protected]> * chore: remove .only Signed-off-by: nikolay <[email protected]> * chore: fix comments Signed-off-by: nikolay <[email protected]> * chore: edit imports Signed-off-by: nikolay <[email protected]> * chore: resolving comments Signed-off-by: nikolay <[email protected]> * chore: fix json parsing Signed-off-by: nikolay <[email protected]> * chore: add e2e test Signed-off-by: nikolay <[email protected]> * chore: fix test Signed-off-by: nikolay <[email protected]> * chore: fix test Signed-off-by: nikolay <[email protected]> * chore: fix flaky test Signed-off-by: nikolay <[email protected]> * chore: tests Signed-off-by: nikolay <[email protected]> * chore: try to disable the test Signed-off-by: nikolay <[email protected]> * chore: add test Signed-off-by: nikolay <[email protected]> * chore: resolve comments Signed-off-by: nikolay <[email protected]> * chore: simplify the tests Signed-off-by: nikolay <[email protected]> --------- Signed-off-by: nikolay <[email protected]> Revert "feat: transaction with `CONTRACT_NEGATIVE_VALUE` breaks some routes (#3387)" This reverts commit 8bc3991. Reapply "feat: transaction with `CONTRACT_NEGATIVE_VALUE` breaks some routes (#3387)" This reverts commit 8d52b9a07a43cecd6241eaa9a7f2e65c4df8d4e5. Signed-off-by: Logan Nguyen <[email protected]>
…aks some routes (#3387) to release/0.64 (#3436) * feat: transaction with `CONTRACT_NEGATIVE_VALUE` breaks some routes (#3387) * chore: handle contract negative value calls Signed-off-by: nikolay <[email protected]> * chore: remove .only Signed-off-by: nikolay <[email protected]> * chore: fix comments Signed-off-by: nikolay <[email protected]> * chore: edit imports Signed-off-by: nikolay <[email protected]> * chore: resolving comments Signed-off-by: nikolay <[email protected]> * chore: fix json parsing Signed-off-by: nikolay <[email protected]> * chore: add e2e test Signed-off-by: nikolay <[email protected]> * chore: fix test Signed-off-by: nikolay <[email protected]> * chore: fix test Signed-off-by: nikolay <[email protected]> * chore: fix flaky test Signed-off-by: nikolay <[email protected]> * chore: tests Signed-off-by: nikolay <[email protected]> * chore: try to disable the test Signed-off-by: nikolay <[email protected]> * chore: add test Signed-off-by: nikolay <[email protected]> * chore: resolve comments Signed-off-by: nikolay <[email protected]> * chore: simplify the tests Signed-off-by: nikolay <[email protected]> --------- Signed-off-by: nikolay <[email protected]> Revert "feat: transaction with `CONTRACT_NEGATIVE_VALUE` breaks some routes (#3387)" This reverts commit 8bc3991. Reapply "feat: transaction with `CONTRACT_NEGATIVE_VALUE` breaks some routes (#3387)" This reverts commit 8d52b9a07a43cecd6241eaa9a7f2e65c4df8d4e5. Signed-off-by: Logan Nguyen <[email protected]> * fix: fixed ci Signed-off-by: Logan Nguyen <[email protected]> * fix: fixed CI Signed-off-by: Logan Nguyen <[email protected]> --------- Signed-off-by: Logan Nguyen <[email protected]> Co-authored-by: Logan Nguyen <[email protected]>
Description:
It seems like
eth_getBlockByNumber
fails because one of the transactions in the block was a CONTRACT_NEGATIVE_VALUE failure. The expectation is for the block to be successfully returned.Steps to reproduce:
eth_getBlockByNumber
on block 73298898The problematic transaction is here
Related issue(s):
Fixes #3367
Notes for reviewer:
Checklist