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

DONTMERGE: Import schnorrkel plutus #1742

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

locallycompact
Copy link
Contributor


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

@locallycompact locallycompact force-pushed the lc/schnorrkel branch 6 times, most recently from 1cb11a3 to eb5071d Compare November 19, 2024 16:40
Copy link

github-actions bot commented Nov 19, 2024

Transaction cost differences

Script summary

Name Size (Bytes)
νInitial -
νCommit -
νHead -
μHead -
νDeposit -

Init transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
44 - - - -

Commit transaction costs

UTxO Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
54 - - - -

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 - - - - -
2 - - - - -
3 - - - - -
4 - - - - -
5 - - - - -
6 - - - - -
7 - - - - -
8 - - - - -
9 - - - - -
10 - - - - -

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 - $${\color{green}-0.39}$$ $${\color{green}-0.09}$$ -
2 - - - -
3 - $${\color{green}-0.38}$$ $${\color{green}-0.09}$$ -
5 - $${\color{green}-0.39}$$ $${\color{green}-0.09}$$ -
10 - $${\color{green}-0.38}$$ $${\color{green}-0.10}$$ -
43 - - - -

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
45 - - - -

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
41 - - - -

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
33 - - - -

FanOut transaction costs

UTxO, Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
(0, 10) - - - - -
(1, 10) - - - - -
(5, 10) - - - - -
(10, 10) - - - - -
(20, 10) - - - - -
(40, 10) - - - - -
(41, 10) - - - - -

Copy link

github-actions bot commented Nov 19, 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 2025-01-20 16:21:29.223466549 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial c8a101a5c8ac4816b0dceb59ce31fc2258e387de828f02961d2f2045 2652
νCommit 61458bc2f297fff3cc5df6ac7ab57cefd87763b0b7bd722146a1035c 685
νHead 5350e9d521552ebfd9e846fd70c3b801f716fc14296134ec0fb71e97 14492
μHead 6b49dc4e571207d615dba01996548cb610b0caa85c30423d169d0091* 5612
νDeposit ae01dade3a9c346d5c93ae3ce339412b90a0b8f83f94ec6baa24e30c 1102
  • 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 6168 10.00 3.17 0.53
2 6366 12.04 3.82 0.56
3 6570 14.26 4.52 0.59
5 6969 18.52 5.87 0.65
10 7974 28.59 9.03 0.80
44 14811 98.35 30.97 1.82

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 561 2.44 1.16 0.20
2 743 3.38 1.73 0.22
3 919 4.36 2.33 0.24
5 1280 6.41 3.60 0.28
10 2169 12.13 7.25 0.40
54 10076 98.61 68.52 1.88

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 56 524 24.20 7.07 0.42
2 114 636 32.98 9.56 0.51
3 171 747 39.82 11.60 0.59
4 226 858 50.94 14.68 0.71
5 283 969 58.67 16.89 0.79
6 338 1081 74.73 21.10 0.95
7 394 1192 71.25 20.69 0.93
8 448 1303 93.53 26.47 1.15

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1820 24.13 8.03 0.48
2 1946 25.09 9.04 0.50
3 2131 27.62 10.57 0.54
5 2332 29.71 12.49 0.58
10 3214 41.24 19.74 0.77
42 7963 96.93 59.57 1.71

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 618 22.68 7.32 0.41
2 752 23.93 8.35 0.44
3 942 26.59 9.75 0.48
5 1140 27.79 11.40 0.51
10 2024 40.73 18.35 0.70
43 6790 98.05 56.46 1.65

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 648 28.56 9.14 0.48
2 824 28.68 9.92 0.49
3 910 29.65 10.79 0.51
5 1310 36.69 14.56 0.61
10 2046 43.48 20.22 0.74
37 5915 90.83 53.81 1.53

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 688 33.35 10.43 0.53
2 768 34.73 11.40 0.55
3 933 37.17 12.93 0.58
5 1200 41.09 15.46 0.65
10 2199 54.52 23.56 0.86
30 5026 96.47 50.31 1.51

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 6043 26.17 8.85 0.69
2 6136 31.63 10.65 0.75
3 6353 44.20 15.00 0.90
4 6551 53.92 18.35 1.01
5 6640 62.73 21.28 1.10
6 6626 69.50 23.40 1.17
7 6951 81.61 27.76 1.32
8 7068 91.46 31.02 1.42
9 7062 97.88 33.09 1.49

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 ₳
10 1 57 6196 20.72 7.21 0.64
10 5 284 6332 27.98 10.15 0.73
10 20 1140 6843 57.20 21.90 1.07
10 30 1708 7183 76.42 29.65 1.30
10 40 2276 7521 96.18 37.59 1.53
10 41 2332 7553 99.08 38.72 1.56

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 2025-01-20 16:24:59.140472173 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 3.825173580
P99 7.764942699999995ms
P95 4.37944165ms
P50 3.6906865ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 21.824219088
P99 110.22203984999997ms
P95 28.78086585ms
P50 19.620402ms
Number of Invalid txs 0

Copy link

github-actions bot commented Nov 19, 2024

Test Results

  5 files  ±0  165 suites  ±0   31m 57s ⏱️ + 2m 31s
562 tests +1  560 ✅ +1  2 💤 ±0  0 ❌ ±0 
564 runs  +1  562 ✅ +1  2 💤 ±0  0 ❌ ±0 

Results for commit b665c13. ± Comparison against base commit af5c305.

♻️ This comment has been updated with latest results.


let tx' = txSpendingUTxO scriptUTxO

send n1 $ input "NewTx" ["transaction" .= tx']
Copy link
Contributor

Choose a reason for hiding this comment

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

This is looking lovely.

I think the main thing we need here is to close the Head and make sure the UTxO can be fanned out back to L1.

@locallycompact locallycompact force-pushed the lc/schnorrkel branch 4 times, most recently from 7d8d530 to d6ff585 Compare December 2, 2024 15:04
@v0d1ch v0d1ch force-pushed the lc/schnorrkel branch 3 times, most recently from 23a82ef to d180493 Compare December 12, 2024 09:58
@v0d1ch v0d1ch force-pushed the lc/schnorrkel branch 2 times, most recently from 7f70541 to 4042cc4 Compare December 24, 2024 18:08
@locallycompact locallycompact force-pushed the lc/schnorrkel branch 6 times, most recently from 1cce7d3 to 8bef572 Compare January 8, 2025 16:39
@noonio noonio force-pushed the lc/schnorrkel branch 2 times, most recently from 7d42c2b to 366f7cf Compare January 13, 2025 11:31
locallycompact and others added 3 commits January 14, 2025 06:43
add singlePartyUsesSchnorrkelScriptOnL2 scenario test

Finalize schnorkel test case

There is some refactoring in order but the test itself is fine.

Update plutus source-repository-package

treefmt

fixup

Have some ada for the min UTxO

Almost there; insufficient collateral now

Trying to be more clear about the UTxOs to pay for things

WIP on schnorrkel; just missing script as input
@ch1bo ch1bo changed the title Import schnorrkel plutus DONTMERGE: Import schnorrkel plutus Jan 21, 2025
@ch1bo ch1bo marked this pull request as draft January 21, 2025 10:36
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.

Spike: Custom ledger containing a new primitive operation - can we still decommit/close?
2 participants