Skip to content

feat: HTSConnector fuzz testing #3733

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

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

Conversation

natanasow
Copy link
Contributor

@natanasow natanasow commented Apr 29, 2025

Description:

Hedera Token Service only works with int64 values, which means that the max number of tokens that can be represented (in 8 decimals) is about 92 million tokens:

  • int64.max = 9,223,372,036,854,775,807 atomic units
  • decimals 8
  • max tokens: 92,233,720.36854775

On other chains, for example, Ethereum, services usually use uint256, which means much higher values can be presented. This can lead to issues in cases where protocols are porting over high liquidity from EVM chains to Hedera. We need to fuzz the HTSConnector _credit function.

Related issue(s):

Fixes #3734

Notes for reviewer:

Checklist

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

konstantinabl and others added 2 commits April 24, 2025 13:58
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: nikolay <[email protected]>
Copy link

github-actions bot commented Apr 29, 2025

Test Results

 18 files   -   2  237 suites   - 18   37m 3s ⏱️ - 4m 26s
629 tests ±  0  625 ✅ +  3  4 💤 ±0  0 ❌  - 3 
645 runs   - 170  641 ✅  - 165  4 💤 ±0  0 ❌  - 5 

Results for commit f1184cc. ± Comparison against base commit dbc5f68.

♻️ This comment has been updated with latest results.

Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
Signed-off-by: nikolay <[email protected]>
@natanasow natanasow marked this pull request as ready for review April 30, 2025 06:13
@natanasow natanasow requested review from a team as code owners April 30, 2025 06:13
@natanasow natanasow added this to the 0.69.0 milestone Apr 30, 2025
@natanasow natanasow added the enhancement New feature or request label Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTS connector add fuzzing to ensure no edge cases with uint to int64
3 participants