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

Smoke test failed to recollect funds #967

Merged
merged 1 commit into from Jul 5, 2023

Conversation

v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Jul 4, 2023

fix #960

Why

Failing smoke-test run:
https://github.com/input-output-hk/hydra/actions/runs/5421129063/jobs/9856170945

Smoke tests do succeed but we are not able to return funds back to the faucet. This happens because we are not selecting all of the value present in the actor utxo but rely that it will contain only ada.

When trying to send back the funds the possible tokens are ignored so the transaction we are trying to post is not valid (there needs to be at least minimum ada next to the token value)

What

Take into account that there might be some tokens present other than ada in the actor utxo. Burn those tokens since we do not need them and send back all remaining lovelace back to the faucet.

Here is one successful run with these changes for preview network


  • CHANGELOG updated or not needed
  • Documentation updated or not needed
  • Haddocks updated or not needed
  • No new TODOs introduced or explained herafter

@v0d1ch v0d1ch self-assigned this Jul 4, 2023
@github-actions
Copy link

github-actions bot commented Jul 4, 2023

Transactions Costs

Sizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using arbitrary values and results are not fully deterministic and comparable to previous runs.

Metadata
Generated at 2023-07-05 16:33:33.056020647 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 2212a4ee618434b9b2f366d7c330dbdfb5c7072e793a850fd0de6ddd 4294
νCommit 69e1ccf9ad73dc6d37a5bc8de5aec86f3c4c1710fe5fd334e0e16b18 2124
νHead 8ae095dca4d14a1b8edffb37faa6c84ec60340fbf389a62f027e0b76 9355
μHead 33642a45c7fbb955ce1704ef09229bb211bf9af9980530db28c6aafe* 4148
  • The minting policy hash is only usable for comparison. As the script is parameterized, the actual script is unique per Head.

Cost of Init Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 4743 13.99 5.50 0.51
2 4946 14.69 5.70 0.53
3 5156 18.72 7.28 0.58
5 5561 24.37 9.45 0.66
10 6586 35.12 13.46 0.82
37 12128 99.03 37.57 1.75

Cost of Commit Transaction

This is using ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 599 14.98 5.74 0.34
2 784 19.57 7.70 0.40
3 973 24.66 9.84 0.46
5 1347 36.15 14.59 0.61
10 2281 71.81 28.88 1.04
13 2840 98.11 39.18 1.35

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 814 27.89 10.83 0.49
2 114 1133 43.42 16.99 0.67
3 171 1456 61.34 24.17 0.88
4 226 1775 82.48 32.65 1.13

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 640 18.88 8.42 0.39
2 671 17.50 7.35 0.37
3 969 21.37 10.82 0.44
5 1299 24.46 13.45 0.50
10 2124 31.12 19.62 0.64
50 8721 86.87 69.87 1.74

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 683 24.77 10.63 0.46
2 841 26.49 12.01 0.49
3 1006 28.20 13.38 0.52
5 1328 31.20 15.95 0.58
10 2170 39.77 22.80 0.73
45 7937 99.74 70.74 1.82

Cost of Abort Transaction

Some variation because of random mixture of still initial and already committed outputs.

Parties Tx size % max Mem % max CPU Min fee ₳
1 4856 22.40 9.38 0.61
2 5108 33.73 14.16 0.75
3 5356 49.21 20.82 0.93
4 5816 73.48 31.59 1.23
5 6140 96.22 41.54 1.50

Cost of FanOut Transaction

Involves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.

Parties UTxO UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
5 0 0 4760 8.66 3.57 0.46
5 1 57 4801 10.06 4.39 0.47
5 5 284 4943 15.64 7.69 0.55
5 10 570 5121 22.61 11.82 0.64
5 20 1140 5485 36.56 20.07 0.83
5 30 1710 5846 50.52 28.33 1.02
5 40 2274 6197 64.49 36.60 1.21
5 50 2849 6565 78.46 44.87 1.40
5 65 3701 7100 99.42 57.28 1.68

@github-actions
Copy link

github-actions bot commented Jul 4, 2023

Test Results

316 tests  ±0   310 ✔️ ±0   26m 13s ⏱️ - 3m 32s
107 suites ±0       6 💤 ±0 
    5 files   ±0       0 ±0 

Results for commit 2680d45. ± Comparison against base commit ef4780a.

♻️ This comment has been updated with latest results.

@abailly-iohk abailly-iohk force-pushed the smoke-test-failed-to-recollect-funds branch from 2ad9f96 to 2680d45 Compare July 5, 2023 16:09
Copy link
Contributor

@abailly-iohk abailly-iohk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just attempted a rebase, there's a test failing on CI experiment which might be a red herring

@abailly-iohk abailly-iohk merged commit 69441d0 into master Jul 5, 2023
38 checks passed
@abailly-iohk abailly-iohk deleted the smoke-test-failed-to-recollect-funds branch July 5, 2023 17:40
let allLovelace = selectLovelace $ balance @Tx utxo
let utxoValue = balance @Tx utxo
let allLovelace = selectLovelace utxoValue
-- select tokens other than ADA here so we can burn it afterwards
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't just burn tokens. Sending them back to the faucet is our only option. So this calculation would be more clear if we would just use utxoValue and do a <> negateValue (lovelaceToValue fee) or so

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.

Smoke test failed to recollect funds
3 participants