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

feat: access list support for signature calculation #17389

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

arianejasuwienas
Copy link
Contributor

@arianejasuwienas arianejasuwienas commented Jan 15, 2025

Description:
When sending transaction with access list the public key and the address of the transaction sender is not properly calculated and it results in error for example of INVALID_ACCOUNT_ID. We added changes in EthTxData.java and EthTxSigs.java to fix this behaviour by firstly read accessList as object of RLPList instance and put it different variable accessListAsRLP. If this variable is present we transform it to array of Object containing byte array and then we add this to RLPEncoder.

We also put unit tests to check if now transactions on which we found this error are now calculating proper signature.

Related issue(s):

#17040

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@arianejasuwienas arianejasuwienas added the Bug An error that causes the feature to behave differently than what was expected based on design. label Jan 15, 2025
@arianejasuwienas arianejasuwienas added this to the v0.59 milestone Jan 15, 2025
@arianejasuwienas arianejasuwienas self-assigned this Jan 15, 2025
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 77.08333% with 11 lines in your changes missing coverage. Please review.

Project coverage is 68.91%. Comparing base (11c7b13) to head (4964f27).
Report is 151 commits behind head on main.

Files with missing lines Patch % Lines
...hedera/node/app/hapi/utils/ethereum/EthTxSigs.java 77.50% 7 Missing and 2 partials ⚠️
...hedera/node/app/hapi/utils/ethereum/EthTxData.java 75.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #17389      +/-   ##
============================================
+ Coverage     64.09%   68.91%   +4.81%     
- Complexity    20729    22676    +1947     
============================================
  Files          2543     2613      +70     
  Lines         95454    97907    +2453     
  Branches       9993    10160     +167     
============================================
+ Hits          61185    67475    +6290     
+ Misses        30664    26613    -4051     
- Partials       3605     3819     +214     
Files with missing lines Coverage Δ
...hedera/node/app/hapi/utils/ethereum/EthTxData.java 85.94% <75.00%> (-0.27%) ⬇️
...hedera/node/app/hapi/utils/ethereum/EthTxSigs.java 75.64% <77.50%> (+0.29%) ⬆️

... and 789 files with indirect coverage changes

Impacted file tree graph

Copy link

codacy-production bot commented Jan 15, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+7.10% (target: -1.00%) 85.42%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (11c7b13) 98219 64599 65.77%
Head commit (4964f27) 93278 (-4941) 67971 (+3372) 72.87% (+7.10%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#17389) 48 41 85.42%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@arianejasuwienas arianejasuwienas marked this pull request as ready for review January 15, 2025 12:31
@arianejasuwienas arianejasuwienas requested review from a team as code owners January 15, 2025 12:31
@arianejasuwienas arianejasuwienas added Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible. and removed Bug An error that causes the feature to behave differently than what was expected based on design. labels Jan 15, 2025
Copy link
Member

@david-bakin-sl david-bakin-sl left a comment

Choose a reason for hiding this comment

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

Have a question about EthTxData.equals and also a suggestion about additional unit tests.

…equals method, adding new tests for the access list rlp (#17040)

Signed-off-by: Mariusz Jasuwienas <[email protected]>
Copy link
Member

@david-bakin-sl david-bakin-sl left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible.
Projects
Status: Tasks In Progress
Development

Successfully merging this pull request may close these issues.

3 participants