Skip to content
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

[Flow EVM] fix the issue with the hash calculation of the direct calls #6118

Merged

Conversation

ramtinms
Copy link
Contributor

@ramtinms ramtinms commented Jun 18, 2024

Closes: #6115

To support the 3rd party tools that are not Flow aware, we compute the hash for the direct calls using Legacy Tx format. Yet we don't have signatures, and the uniqueness of hash values is dependent on the source (From field) and nonce. In this PR we define a canonical format for the legacy tx where we include the source information as part of the signatures (V) and we also define what should be set for R, and S.

@ramtinms ramtinms requested review from devbugging and turbolent June 18, 2024 18:27
@ramtinms ramtinms marked this pull request as ready for review June 18, 2024 18:27
Copy link
Collaborator

@m-Peter m-Peter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
A few comments might need an update.

Copy link
Collaborator

@m-Peter m-Peter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 🎉

Copy link
Contributor

@janezpodhostnik janezpodhostnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires an HCU on previewnet right?

@ramtinms
Copy link
Contributor Author

@janezpodhostnik yes, it might also break some older tranasactions, so we might keep it for the testnet :-?

@janezpodhostnik
Copy link
Contributor

That means that if we merge this, we will have to be careful to exclude it from any upgrades we do to previewnet in the future.

@ramtinms ramtinms enabled auto-merge June 24, 2024 16:24
@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.62%. Comparing base (741cb37) to head (b7f63d6).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6118   +/-   ##
=======================================
  Coverage   41.62%   41.62%           
=======================================
  Files        1973     1973           
  Lines      139330   139331    +1     
=======================================
+ Hits        57990    57995    +5     
+ Misses      75318    75316    -2     
+ Partials     6022     6020    -2     
Flag Coverage Δ
unittests 41.62% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ramtinms ramtinms disabled auto-merge June 24, 2024 18:53
ramtinms added 2 commits June 24, 2024 11:56
…of github.com:onflow/flow-go into ramtin/6115-fix-potential-hash-issue-for-direct-calls
@ramtinms ramtinms enabled auto-merge June 24, 2024 18:58
@ramtinms ramtinms added this pull request to the merge queue Jun 24, 2024
Merged via the queue into master with commit 8041951 Jun 24, 2024
55 checks passed
@ramtinms ramtinms deleted the ramtin/6115-fix-potential-hash-issue-for-direct-calls branch June 24, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Flow EVM] Possible hash collision for direct calls
5 participants