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

Reduce cost of commitTx #652

Merged
merged 5 commits into from
Dec 15, 2022
Merged

Reduce cost of commitTx #652

merged 5 commits into from
Dec 15, 2022

Conversation

ffakenz
Copy link
Contributor

@ffakenz ffakenz commented Dec 12, 2022

🦚 By making use of the initial script reference as input reference, we can replace the scripts: v_initial and reduce the cost of the commitTx.

  • CHANGELOG is up to date
  • Documentation is up to date

@ffakenz ffakenz marked this pull request as draft December 12, 2022 13:57
@ffakenz ffakenz changed the title Use initial script reference on commitTx Reduce cost of commitTx Dec 12, 2022
@ffakenz ffakenz marked this pull request as ready for review December 14, 2022 10:37
@v0d1ch v0d1ch self-requested a review December 14, 2022 10:45
@github-actions
Copy link

github-actions bot commented Dec 14, 2022

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 2022-12-14 10:56:24.914785224 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Cost of Init Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 4836 9.43 3.72 0.47
2 5038 13.77 5.46 0.52
3 5242 15.37 6.06 0.55
5 5653 20.08 7.90 0.62
10 6678 29.51 11.52 0.77
45 13855 96.61 37.31 1.81

Cost of Commit Transaction

Currently only one UTxO per commit allowed (this is about to change soon)

UTxO Tx size % max Mem % max CPU Min fee ₳
1 576 20.53 8.33 0.40

Cost of CollectCom Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 13129 21.17 8.49 0.96
2 13380 36.38 14.73 1.14
3 13774 55.88 22.82 1.37
4 14092 77.63 31.86 1.63

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 9331 8.19 3.36 0.65
2 9494 8.97 3.81 0.67
3 9657 9.75 4.27 0.68
5 10027 11.93 5.41 0.73
10 10841 15.60 7.58 0.81
30 14230 32.81 17.24 1.17
56 14817 34.87 13.23 1.18

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 9328 8.16 3.34 0.65
2 9496 8.94 3.79 0.67
3 9660 9.72 4.24 0.68
5 10062 12.35 5.56 0.73
10 10847 15.57 7.56 0.81
30 14225 32.74 17.20 1.16
43 16367 42.78 23.03 1.38

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 13562 23.40 9.69 1.01
2 13817 38.24 16.27 1.18
3 13999 54.14 23.17 1.37
4 14037 69.17 29.63 1.54
5 14006 83.25 35.51 1.70

Cost of FanOut Transaction

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

UTxO Tx size % max Mem % max CPU Min fee ₳
1 13420 9.88 4.31 0.85
2 13456 11.40 5.19 0.87
3 13556 13.60 6.34 0.90
5 13693 17.27 8.35 0.95
10 13869 24.33 12.52 1.05
50 15181 84.50 47.45 1.84
60 15546 99.75 56.26 2.05

@github-actions
Copy link

Test Results

277 tests  ±0   271 ✔️ ±0   15m 54s ⏱️ + 2m 10s
  96 suites ±0       6 💤 ±0 
    5 files   ±0       0 ±0 

Results for commit 43003c9. ± Comparison against base commit 226e1bf.

CHANGELOG.md Show resolved Hide resolved
Copy link
Contributor

@v0d1ch v0d1ch left a comment

Choose a reason for hiding this comment

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

Bang! great work guys 🎉

@ch1bo ch1bo merged commit 193d15b into master Dec 15, 2022
@ch1bo ch1bo deleted the task/reduce_cost_commit_tx branch December 15, 2022 10:22
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