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

Remove hard-coded fee; spec name more specific #1547

Closed
wants to merge 1 commit into from

Conversation

noonio
Copy link
Contributor

@noonio noonio commented Aug 2, 2024


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

Copy link

github-actions bot commented Aug 2, 2024

Transaction 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 2024-08-02 15:11:21.64287796 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 2fac819a1f4f14e29639d1414220d2a18b6abd6b8e444d88d0dda8ff 3799
νCommit 2043a9f1a685bcf491413a5f139ee42e335157c8c6bc8d9e4018669d 1743
νHead bd9fad235c871fb7f837c767593018a84be3083ff80f9dab5f1c55f9 10194
μHead c8038945816586c4d38926ee63bba67821eb863794220ebbd0bf79ee* 4607
  • The minting policy hash is only usable for comparison. As the script is parameterized, the actual script is unique per head.

Init transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 5188 5.69 2.25 0.44
2 5393 7.09 2.80 0.47
3 5591 8.65 3.42 0.49
5 5994 11.22 4.43 0.54
10 6999 18.11 7.16 0.66
56 16244 81.63 32.29 1.76

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 559 10.52 4.15 0.29
2 744 13.86 5.65 0.34
3 934 17.33 7.20 0.38
5 1309 24.65 10.44 0.48
10 2247 45.22 19.36 0.75
20 4115 95.99 40.76 1.40

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 553 22.14 8.66 0.42
2 114 659 32.95 13.05 0.54
3 171 769 46.44 18.57 0.69
4 226 879 58.84 23.79 0.84
5 283 994 78.55 31.84 1.06
6 339 1100 89.92 36.88 1.19

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 631 17.71 7.80 0.38
2 755 19.33 9.15 0.41
3 957 21.66 10.78 0.45
5 1114 21.97 12.33 0.47
10 1992 32.90 20.25 0.65
47 7488 90.95 69.74 1.72

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 667 21.02 9.42 0.42
2 847 22.83 11.14 0.45
3 866 23.50 11.86 0.46
5 1250 27.12 15.31 0.53
10 2010 35.37 23.17 0.69
49 7780 97.90 82.27 1.88

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 685 27.14 11.67 0.48
2 807 28.94 13.18 0.51
3 1047 31.10 15.06 0.56
5 1245 34.49 17.98 0.61
10 2129 44.69 26.78 0.80
39 6381 99.79 73.65 1.77

Abort transaction costs

There is some variation due to the random mixture of initial and already committed outputs.

Parties Tx size % max Mem % max CPU Min fee ₳
1 5067 17.47 7.60 0.57
2 5169 28.43 12.46 0.70
3 5266 37.79 16.52 0.81
4 5489 55.20 24.43 1.01
5 5591 75.87 33.71 1.25
6 5751 93.60 41.65 1.46

FanOut transaction costs

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 5022 7.64 3.23 0.46
5 1 57 5056 8.88 3.99 0.47
5 5 285 5192 13.60 6.92 0.54
5 10 569 5361 19.06 10.39 0.62
5 20 1136 5699 30.19 17.43 0.77
5 30 1710 6044 41.90 24.72 0.93
5 40 2275 6379 53.03 31.76 1.09
5 50 2845 6719 64.37 38.89 1.25
5 81 4612 7773 99.53 61.01 1.74

End-to-end benchmark results

This page is intended to collect the latest end-to-end benchmark results produced by Hydra's continuous integration (CI) system from the latest master code.

Please note that these results are approximate as they are currently produced from limited cloud VMs and not controlled hardware. Rather than focusing on the absolute results, the emphasis should be on relative results, such as how the timings for a scenario evolve as the code changes.

Generated at 2024-08-02 15:14:46.189702006 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.311386039
P99 9.084990329999998ms
P95 6.039365449999994ms
P50 4.0626845ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 24.319877603
P99 116.21612897ms
P95 33.651826799999995ms
P50 21.7664355ms
Number of Invalid txs 0

Copy link

github-actions bot commented Aug 2, 2024

Test Results

464 tests  ±0   457 ✅ ±0   17m 18s ⏱️ +37s
149 suites ±0     7 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit a321a06. ± Comparison against base commit 1754eff.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
Test.EndToEnd/End-to-end on Cardano devnet/forking eras ‑ support new era
Test.EndToEnd/End-to-end on Cardano devnet/forking eras ‑ support new era without restart

@@ -312,7 +312,6 @@ coverFee_ pparams systemStart epochInfo lookupUTxO walletUTxO partialTx@Babbage.
costingTx =
unbalancedTx
& bodyTxL . outputsTxBodyL %~ (|> feeTxOut)
& bodyTxL . feeTxBodyL .~ Coin 10_000_000
Copy link
Collaborator

Choose a reason for hiding this comment

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

Must: not remove this.

This is needed because the fee is computed based on the serialized size of the body. Having a reasonable (correct order of magnitude) value here, will ensure that we estimate an upper bound.

However, there might be other reasons for why the fee ends up to be too small:

  • The costingTx does use feeTxOut as a stand-in change output, which might be smaller than what we add later with change
  • The estimateMinFeeTx is taking Babbage protocol parameters and consequently will not use the new Conway specific computation. As we are spending from reference scripts, that is the most likely source for too small fees

@ch1bo ch1bo closed this Aug 6, 2024
@ch1bo ch1bo deleted the remove-hardcoded-tx-fee branch August 6, 2024 08:06
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.

2 participants