-
Notifications
You must be signed in to change notification settings - Fork 179
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
[EVM] Direct call hash calculation #5369
Conversation
@ramtinms one question I have about the implementation that I'm not sure how to address. We now have hash calculated out of a certain subset of direct call data, which means there might be multiple direct calls that produce the same hash actually since direct calls are not using nonces that might have been true even before. What if you make two direct call deposits with the same amount, and address etc, I believe they would produce the same hash. I don't believe this change introduces this problem, but it makes it maybe a bit worse even, since now we don't have the subtype included which means multiple subtype calls could even have the same hash. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5369 +/- ##
==========================================
+ Coverage 55.96% 60.66% +4.69%
==========================================
Files 1024 678 -346
Lines 99184 66805 -32379
==========================================
- Hits 55512 40526 -14986
+ Misses 39423 23132 -16291
+ Partials 4249 3147 -1102
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Closes: #5370
This PR changes how direct call calculation is done. It now relies on the implementation of hash calculation from the geth Transaction.
This was changed because the direct call hash was included in the block as transaction hashes, which meant that any client would expect to be able to fetch that transaction and then recalculate the same hash, but since the direct call had a custom hash calculation the transaction calculated hash would differ.