hedera-services icon indicating copy to clipboard operation
hedera-services copied to clipboard

fix: Exchange rate precompile return error when called with value #13052

Open stefan-stefanooov opened this issue 10 months ago • 10 comments

Description: Executing an internal call with value against PRNG/Exchange rate precompile addresses returns success. Only the contract that acts as middleman is credited with hbars.

Related issue(s): https://github.com/hashgraph/hedera-services/pull/12793

Fixes #https://github.com/hashgraph/hedera-services/issues/11218

stefan-stefanooov avatar Apr 30 '24 12:04 stefan-stefanooov

Node: HAPI Test (Restart) Results

2 tests   2 :white_check_mark:  5m 27s :stopwatch: 2 suites  0 :zzz: 2 files    0 :x:

Results for commit b5b4529b.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Apr 30 '24 12:04 github-actions[bot]

Node: HAPI Test (Node Death Reconnect) Results

2 tests   2 :white_check_mark:  6m 59s :stopwatch: 2 suites  0 :zzz: 2 files    0 :x:

Results for commit b5b4529b.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Apr 30 '24 12:04 github-actions[bot]

Node: HAPI Test (Token) Results

235 tests   234 :white_check_mark:  19m 51s :stopwatch:  17 suites    1 :zzz:  17 files      0 :x:

Results for commit b5b4529b.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Apr 30 '24 12:04 github-actions[bot]

Node: HAPI Test (Crypto) Results

335 tests   335 :white_check_mark:  38m 35s :stopwatch:  25 suites    0 :zzz:  25 files      0 :x:

Results for commit b5b4529b.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Apr 30 '24 13:04 github-actions[bot]

Node: HAPI Test (Misc) Results

459 tests   449 :white_check_mark:  41m 54s :stopwatch:  77 suites   10 :zzz:  77 files      0 :x:

Results for commit b5b4529b.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Apr 30 '24 13:04 github-actions[bot]

Node: HAPI Test (Time Consuming) Results

21 tests   21 :white_check_mark:  54m 34s :stopwatch:  3 suites   0 :zzz:  3 files     0 :x:

Results for commit b5b4529b.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Apr 30 '24 13:04 github-actions[bot]

Node: Unit Test Results

  2 280 files  ±0    2 280 suites  ±0   2h 54m 18s :stopwatch: - 40m 51s 118 798 tests +1  118 731 :white_check_mark: +1  67 :zzz: ±0  0 :x: ±0  127 283 runs  +1  127 216 :white_check_mark: +1  67 :zzz: ±0  0 :x: ±0 

Results for commit b5b4529b. ± Comparison against base commit 636f9298.

This pull request removes 4010 and adds 3774 tests. Note that renamed tests count towards both.

  
             IssuerDN: CN=s-aaaa
            SubjectDN: CN=s-aaaa
           Final Date: Fri Jan 01 00:00:00 UTC 2100
           Public Key: RSA Public Key [2e:28:bc:1e:d3:83:25:92:8e:cb:98:b1:b6:84:06:9c:d5:d8:14:d5],[56:66:d1:a4]
           Start Date: Sat Jan 01 00:00:00 UTC 2000
         SerialNumber: 12482092706667292405
        modulus: c1a0ff5d2372b53d12d12bb87dd03f5e…
        modulus: c1a0ff5d2372b53d12d12bb87dd03f5…
…
com.hedera.node.app.grpc.impl.netty.GrpcServiceBuilderTest ‑ [4] 

com.hedera.node.app.grpc.impl.netty.GrpcServiceBuilderTest ‑ [6] 

com.hedera.node.app.grpc.impl.netty.GrpcServiceBuilderTest ‑ [7]   
  
com.hedera.node.app.service.contract.impl.test.exec.systemcontracts.ExchangeRateSystemContractTest ‑ valueShouldNotBeSentToThePrecompile()
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [10] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@ee4e7613
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [11] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@36a180d6
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [12] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@b76595b4
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [13] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@81d72601
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [14] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@b168b92e
com.hedera.node.app.service.mono.state.codec.VirtualKeySerdesAdapterTest ‑ [15] com.hedera.node.app.service.mono.state.codec.VirtualBlobKey@8a4a3a89
…

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Apr 30 '24 13:04 github-actions[bot]

Node: HAPI Test (Smart Contract) Results

589 tests   589 :white_check_mark:  1h 11m 31s :stopwatch:  63 suites    0 :zzz:  63 files      0 :x:

Results for commit b5b4529b.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Apr 30 '24 13:04 github-actions[bot]

Seems reasonable but should there not be a HAPI test to show that the transaction reverts as outlined in the original issue?

Hey @lukelee-sl Thank you for the review. I have added integration test as well. Please have another look.

stefan-stefanooov avatar May 10 '24 11:05 stefan-stefanooov

Seems reasonable but should there not be a HAPI test to show that the transaction reverts as outlined in the original issue?

Hey @lukelee-sl Thank you for the review. I have added integration test as well. Please have another look.

Thanks for adding the test. Looks good.

lukelee-sl avatar May 10 '24 16:05 lukelee-sl