Skip to content

fix: treat an out-of-range allowance amount as an invalid op #12444

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

Merged

Conversation

tinker-michaelj
Copy link
Contributor

@tinker-michaelj tinker-michaelj commented Mar 29, 2024

  • Closes Additional modular record found at 2024-03-12T08:16:01 (round 165031201) #12267
  • Treat an approve(address, amount) call to the HTS system contract as an invalid operation when amount is outside range of a 64-bit long.
    • This is both backward-compatible, and more in line with the overall convention that if an HtsCallAttempt cannot be translated into a plausible TransactionBody, it halts as an invalid operation.

Copy link

Node: HAPI Test (Restart) Results

2 tests   2 ✔️  5m 20s ⏱️
2 suites  0 💤
2 files    0

Results for commit 51ef049.

Copy link

Node: HAPI Test (Node Death Reconnect) Results

2 tests   2 ✔️  6m 42s ⏱️
2 suites  0 💤
2 files    0

Results for commit 51ef049.

Copy link

Node: HAPI Test (Token) Results

207 tests   207 ✔️  19m 3s ⏱️
  16 suites      0 💤
  16 files        0

Results for commit 51ef049.

Copy link

Node: HAPI Test (Crypto) Results

214 tests   214 ✔️  26m 0s ⏱️
  23 suites      0 💤
  23 files        0

Results for commit 51ef049.

Copy link

Node: HAPI Test (Misc) Results

432 tests   422 ✔️  40m 4s ⏱️
  75 suites    10 💤
  75 files        0

Results for commit 51ef049.

Copy link

Node: HAPI Test (Time Consuming) Results

21 tests   21 ✔️  54m 3s ⏱️
  3 suites    0 💤
  3 files      0

Results for commit 51ef049.

Copy link

Node: HAPI Test (Smart Contract) Results

494 tests   491 ✔️  1h 4m 55s ⏱️
  55 suites      3 💤
  55 files        0

Results for commit 51ef049.

Copy link

Node: Unit Test Results

    2 264 files  ±0      2 264 suites  ±0   3h 49m 49s ⏱️ - 7m 13s
112 186 tests ±0  112 137 ✔️ ±0  49 💤 ±0  0 ±0 
120 647 runs  ±0  120 598 ✔️ ±0  49 💤 ±0  0 ±0 

Results for commit 51ef049. ± Comparison against base commit 0e082d1.

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

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 it seems to be missing a test that an amount that is >2⁶⁴ fails the call (as invalid operation).

@Neeharika-Sompalli Neeharika-Sompalli merged commit ddae1c3 into release/0.48 Apr 1, 2024
@Neeharika-Sompalli Neeharika-Sompalli deleted the 12267-neg-allow-amount-is-invalid-op branch April 1, 2024 17:05
imalygin pushed a commit that referenced this pull request Apr 17, 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.

4 participants