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

fix: Validate CustomFees input arrays in UpdateTokenCustomFeesDecoder #15520

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

stoyanov-st
Copy link
Contributor

Description:
This PR addresses a fail-fast way of handling invalid amount of fees provided in contract call.

Related issue(s):

Fixes #945

Notes for reviewer:

Checklist

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

Signed-off-by: Stanimir Stoyanov <[email protected]>
Signed-off-by: Stanimir Stoyanov <[email protected]>
@stoyanov-st stoyanov-st added this to the v0.55 milestone Sep 17, 2024
@stoyanov-st stoyanov-st self-assigned this Sep 17, 2024
@stoyanov-st stoyanov-st requested a review from a team September 17, 2024 13:49
@stoyanov-st stoyanov-st requested review from a team and tinker-michaelj as code owners September 17, 2024 13:49
@stoyanov-st stoyanov-st requested a review from kimbor September 17, 2024 13:49
Signed-off-by: Stanimir Stoyanov <[email protected]>
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.25%. Comparing base (9df6208) to head (96e6f4f).
Report is 8 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             develop   #15520   +/-   ##
==========================================
  Coverage      58.25%   58.25%           
- Complexity     21610    21614    +4     
==========================================
  Files           2781     2781           
  Lines         109269   109279   +10     
  Branches       11176    11179    +3     
==========================================
+ Hits           63650    63660   +10     
  Misses         41761    41761           
  Partials        3858     3858           
Files with missing lines Coverage Δ
...etokencustomfees/UpdateTokenCustomFeesDecoder.java 98.76% <100.00%> (+0.17%) ⬆️

Impacted file tree graph

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (9df6208) 109086 67398 61.78%
Head commit (96e6f4f) 109096 (+10) 67408 (+10) 61.79% (+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 (#15520) 10 10 100.00%

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

Copy link
Contributor

@lukelee-sl lukelee-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

@lukelee-sl lukelee-sl merged commit 6c987c2 into develop Sep 18, 2024
44 of 46 checks passed
@lukelee-sl lukelee-sl deleted the 0945-validate-custom-fees-arrays-in-decoder branch September 18, 2024 14:05
netopyr added a commit that referenced this pull request Sep 19, 2024
* develop: (22 commits)
  test: New HAPI test for TokenAirdrop transaction (#15348)
  test: unit test verifySyncInvalidEd25519() is not stable (#15534)
  chore: add `TracerBinding` interface for `TransactionExecutors`. (#15480)
  chore: Add missing javadocs in Consensus Service (#15299)
  fix: Validate `CustomFees` input arrays in `UpdateTokenCustomFeesDecoder` (#15520)
  feat: migrate event serialization to protobuf (#15417)
  fix: 15494: Improve VirtualLeafRecord serialization to bytes during flushes (#15512)
  docs: tss block signing proposal (#15160)
  fix: 15438: Eliminate busy loop in HalfDiskHashMap.endWriting() (#15439)
  build: cleanup settings.gradle.kts / remove build.gradle.kts (#15470)
  test: fix CryptographyTests (#15529)
  fix: recreate block hash from state (#15444)
  docs: Proposal Process Update - Specify post-acceptance non-material update procedure (#15447)
  chore: testnet event hashing (#15432)
  fix: 15167: Remove timeout from reconnect/rehash Iterators (#15468)
  chore: remove snapshot ops (#15462)
  feat: Add TokenUpdateNFTs as a smart contract operation v2 (#15445)
  feat: introduce PbjRecordHasher and RosterUtils.hash(Roster) (#15457)
  fix: Precision loss for gas calculation of HTS system contracts v2 (#15446)
  chore: correct the variable name in roster.proto (#15465)
  ...

# Conflicts:
#	hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/scope/HandleHederaOperations.java
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.

fix: Fail-fast in UpdateTokenCustomFees
2 participants