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: implement hss sign schedule function #16789

Merged
merged 6 commits into from
Dec 2, 2024

Conversation

lukelee-sl
Copy link
Contributor

Description:
Implements the signSchedule proxy contract function and the authorizeSchedule function for the Schedule system contract.

Related issue(s):

Fixes #16700

Notes for reviewer:
A future pr will add additional BDD and unit test.

Checklist

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

@lukelee-sl lukelee-sl added this to the v0.58 milestone Nov 26, 2024
@lukelee-sl lukelee-sl self-assigned this Nov 26, 2024
@lukelee-sl lukelee-sl requested review from a team and tinker-michaelj as code owners November 26, 2024 03:51
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 72.04301% with 26 lines in your changes missing coverage. Please review.

Project coverage is 63.61%. Comparing base (32089ae) to head (24aa9e2).
Report is 7 commits behind head on develop.

Files with missing lines Patch % Lines
...racts/hss/signschedule/SignScheduleTranslator.java 66.07% 14 Missing and 5 partials ⚠️
...mcontracts/hss/DispatchForResponseCodeHssCall.java 92.00% 1 Missing and 1 partial ⚠️
...rvice/contract/impl/exec/TransactionProcessor.java 66.66% 0 Missing and 1 partial ⚠️
.../impl/exec/scope/HandleHederaNativeOperations.java 0.00% 1 Missing ⚠️
...mpl/exec/scope/HandleSystemContractOperations.java 0.00% 1 Missing ⚠️
...ntract/impl/exec/scope/HederaNativeOperations.java 0.00% 1 Missing ⚠️
...ec/systemcontracts/common/AbstractCallAttempt.java 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop   #16789      +/-   ##
=============================================
- Coverage      63.62%   63.61%   -0.02%     
- Complexity     20401    20418      +17     
=============================================
  Files           2537     2537              
  Lines          94757    94867     +110     
  Branches        9904     9918      +14     
=============================================
+ Hits           60288    60347      +59     
- Misses         30863    30906      +43     
- Partials        3606     3614       +8     
Files with missing lines Coverage Δ
...orkflows/handle/dispatch/ChildDispatchFactory.java 91.30% <100.00%> (+0.86%) ⬆️
...a/com/hedera/node/config/data/ContractsConfig.java 100.00% <ø> (ø)
...p/service/contract/impl/exec/gas/DispatchType.java 100.00% <100.00%> (ø)
...impl/exec/scope/QuerySystemContractOperations.java 100.00% <100.00%> (ø)
...ract/impl/exec/scope/SystemContractOperations.java 100.00% <ø> (ø)
...t/impl/exec/systemcontracts/HssSystemContract.java 66.66% <ø> (ø)
.../contract/impl/state/DispatchingEvmFrameState.java 89.47% <ø> (ø)
...rvice/contract/impl/exec/TransactionProcessor.java 94.38% <66.66%> (+0.12%) ⬆️
.../impl/exec/scope/HandleHederaNativeOperations.java 92.30% <0.00%> (-2.43%) ⬇️
...mpl/exec/scope/HandleSystemContractOperations.java 95.12% <0.00%> (-2.38%) ⬇️
... and 4 more

... and 4 files with indirect coverage changes

Impacted file tree graph

Copy link

codacy-production bot commented Nov 26, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 79.57%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (32089ae) 97522 63704 65.32%
Head commit (24aa9e2) 97632 (+110) 63771 (+67) 65.32% (+0.00%)

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 (#16789) 93 74 79.57%

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

stoyanov-st
stoyanov-st previously approved these changes Nov 26, 2024
Copy link
Contributor

@stoyanov-st stoyanov-st left a comment

Choose a reason for hiding this comment

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

Overall LGTM, ty @lukelee-sl !
Left a few suggestions for improvement but all up to you

Signed-off-by: Luke Lee <[email protected]>
stoyanov-st
stoyanov-st previously approved these changes Nov 26, 2024
Copy link
Contributor

@stoyanov-st stoyanov-st left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@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.

Will come back for tests (bdd) later. Some questions for now.

david-bakin-sl
david-bakin-sl previously approved these changes Nov 27, 2024
Copy link
Contributor

@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 (though there's still a question about simple keys remaining for completeness)

Copy link
Contributor

@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 with new solution for 'forwarding" simple keys

Copy link
Contributor

@tinker-michaelj tinker-michaelj left a comment

Choose a reason for hiding this comment

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

LGTM, tyvm @lukelee-sl !

@lukelee-sl lukelee-sl merged commit 029a73f into develop Dec 2, 2024
49 of 50 checks passed
@lukelee-sl lukelee-sl deleted the 16700-implement-sign-schedule branch December 2, 2024 20:45
@lukelee-sl lukelee-sl restored the 16700-implement-sign-schedule branch December 2, 2024 20:47
iwsimon pushed a commit that referenced this pull request Dec 2, 2024
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.

Implement translator and call classes for signSchedule and authorizeSchedule functions
4 participants