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 TokenInfoHTSSuite tests #9509

Merged
merged 11 commits into from Nov 2, 2023
Merged

Conversation

MiroslavGatsanoga
Copy link
Collaborator

@MiroslavGatsanoga MiroslavGatsanoga commented Oct 26, 2023

Description:

Fix child record issues related to token info precompile, making TokenInfoHTSSuite passing as a result.

Also enable a couple of tests in DefaultTokenStatusSuite since changes to read-only precompiles are related to them.

Related issue(s):

#9427

Notes for reviewer:

Checklist

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

Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
@github-actions
Copy link

github-actions bot commented Oct 26, 2023

Node: HAPI Test Results

1 242 tests   783 ✔️  1h 21m 33s ⏱️
   165 suites  459 💤
   165 files        0

Results for commit 04a9c7f.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 26, 2023

Node: E2E Test Results

    1 files      1 suites   20m 56s ⏱️
310 tests 310 ✔️ 0 💤 0
332 runs  332 ✔️ 0 💤 0

Results for commit 04a9c7f.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 26, 2023

Node: Unit Test Results

    2 263 files      2 263 suites   1h 24m 28s ⏱️
118 261 tests 118 227 ✔️ 34 💤 0
126 520 runs  126 486 ✔️ 34 💤 0

Results for commit 04a9c7f.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (43c6178) 65.26% compared to head (04a9c7f) 65.29%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #9509      +/-   ##
=============================================
+ Coverage      65.26%   65.29%   +0.02%     
- Complexity     29678    29685       +7     
=============================================
  Files           3262     3260       -2     
  Lines         124581   124575       -6     
  Branches       12918    12919       +1     
=============================================
+ Hits           81310    81342      +32     
+ Misses         40194    40157      -37     
+ Partials        3077     3076       -1     
Files Coverage Δ
...mpl/exec/scope/HandleSystemContractOperations.java 100.00% <100.00%> (ø)
...impl/exec/scope/QuerySystemContractOperations.java 100.00% <ø> (ø)
...tracts/hts/AbstractNonRevertibleTokenViewCall.java 100.00% <100.00%> (ø)
...s/hts/fungibletokeninfo/FungibleTokenInfoCall.java 93.75% <100.00%> (ø)
...c/systemcontracts/hts/tokeninfo/TokenInfoCall.java 93.33% <100.00%> (ø)
...emcontracts/hts/nfttokeninfo/NftTokenInfoCall.java 91.30% <85.71%> (-4.16%) ⬇️

... and 12 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link

github-actions bot commented Oct 26, 2023

Node: Integration Test Results

280 tests   280 ✔️  32m 27s ⏱️
    5 suites      0 💤
    5 files        0

Results for commit 04a9c7f.

♻️ This comment has been updated with latest results.

Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Copy link
Collaborator

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

Looks great @MiroslavGatsanoga, very cool to see these tests passing. 🙌

I don't think we actually need to pass in the MessageFrame to these HtsCall implementations, however.

  1. The ProxyWorldUpdater's method to externalize system contract result just directly calls an Enhancement method; and the HtsCall implementations already have access to the Enhancement.
  2. For mono-service compatibility, we don't want to skip externalizing the result for any static frame, but only if we are in a ContractCallLocalQuery instead of a HAPI transaction; compare here in mono-service.

I think we just need to make the QuerySystemContractOperations method here a no-op; and then remove the MessageFrame injections. 🤔

method no-op

Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
@MiroslavGatsanoga
Copy link
Collaborator Author

Looks great @MiroslavGatsanoga, very cool to see these tests passing. 🙌

I don't think we actually need to pass in the MessageFrame to these HtsCall implementations, however.

  1. The ProxyWorldUpdater's method to externalize system contract result just directly calls an Enhancement method; and the HtsCall implementations already have access to the Enhancement.
  2. For mono-service compatibility, we don't want to skip externalizing the result for any static frame, but only if we are in a ContractCallLocalQuery instead of a HAPI transaction; compare here in mono-service.

I think we just need to make the QuerySystemContractOperations method here a no-op; and then remove the MessageFrame injections. 🤔

  1. Ah, missed that I can use Enhancement directly instead of ProxyWorldUpdater, will update it with that and remove the injected MessageFrames.
  2. I think I see why this will work, just want to check my understanding: Making QuerySystemContractOperations method a no-op (which basically means to skip it) instead of checking something like proxyUpdater.isInTransaction() as in mono will work because of the @QueryScope annotation which is meant for the ContractCallLocalQuery case. Right?

Will push the updates shortly, tyvm @tinker-michaelj!

Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
Copy link
Collaborator

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

@MiroslavGatsanoga MiroslavGatsanoga merged commit 28afe85 into develop Nov 2, 2023
12 of 13 checks passed
@MiroslavGatsanoga MiroslavGatsanoga deleted the fix-token-info-hts-suite branch November 2, 2023 15:03
imalygin pushed a commit that referenced this pull request Nov 13, 2023
Signed-off-by: Miroslav Gatsanoga <miroslav.gatsanoga@limechain.tech>
@petreze petreze linked an issue Jan 12, 2024 that may be closed by this pull request
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 E2E tests in TokenInfoHTSSuite
2 participants