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

Import schnorrkel plutus #1742

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Import schnorrkel plutus #1742

wants to merge 4 commits into from

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 - +0.38 +0.09 -
5 - $${\color{green}-0.39}$$ $${\color{green}-0.09}$$ -
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-15 14:41:39.440499306 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 6162 10.17 3.24 0.53
2 6365 12.21 3.88 0.56
3 6564 14.09 4.46 0.59
5 6966 18.36 5.81 0.65
10 7974 28.81 9.11 0.80
44 14814 98.04 30.85 1.82

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 563 2.44 1.16 0.20
2 742 3.38 1.73 0.22
3 923 4.36 2.33 0.24
5 1283 6.41 3.60 0.28
10 2179 12.13 7.25 0.40
54 10053 98.61 68.52 1.88

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 525 24.20 7.07 0.42
2 114 636 32.99 9.55 0.51
3 170 747 39.78 11.57 0.59
4 228 858 49.24 14.27 0.69
5 281 969 59.09 17.03 0.79
6 340 1085 72.22 20.68 0.93
7 394 1192 74.18 21.48 0.96
8 453 1303 97.99 27.48 1.20
9 504 1414 98.24 28.05 1.21

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1789 24.05 8.00 0.48
2 1952 25.48 9.13 0.51
3 2118 27.99 10.66 0.55
5 2527 33.24 13.89 0.63
10 3119 39.22 18.97 0.74
45 8167 98.96 61.91 1.76

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 614 22.72 7.33 0.41
2 720 24.17 8.40 0.44
3 940 26.40 9.71 0.47
5 1248 30.36 12.15 0.54
10 1939 37.05 17.33 0.66
43 6702 94.56 55.49 1.61

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 655 28.64 9.16 0.48
2 860 29.25 10.19 0.50
3 988 32.74 11.88 0.54
5 1445 35.95 14.62 0.61
10 2010 45.79 20.84 0.76
40 6410 97.51 58.06 1.64

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 672 33.35 10.42 0.52
2 824 35.34 11.70 0.56
3 946 37.29 12.96 0.59
5 1261 41.77 15.77 0.66
10 2003 51.96 22.36 0.82
31 5326 99.72 52.14 1.57

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 6051 26.08 8.83 0.69
2 6266 35.47 12.06 0.80
3 6194 39.06 13.09 0.83
4 6445 53.08 17.99 0.99
5 6609 59.49 20.17 1.07
6 6596 66.83 22.59 1.14
7 6943 80.96 27.56 1.31
8 6968 85.08 28.79 1.35
9 6960 90.80 30.61 1.41

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 19.62 6.80 0.63
10 5 285 6332 26.36 9.55 0.71
10 10 567 6500 37.04 13.82 0.84
10 20 1138 6840 57.20 21.90 1.07
10 30 1707 7181 77.10 29.90 1.30
10 41 2335 7557 98.35 38.45 1.55

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-15 14:47:01.140569479 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 4.729781373
P99 7.575888829999975ms
P95 5.7820709500000005ms
P50 4.5844275ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 23.191433672
P99 114.48275541999999ms
P95 30.63944745ms
P50 20.937055ms
Number of Invalid txs 0

Copy link

Test Results

  5 files  ±0  161 suites  ±0   28m 7s ⏱️ - 2m 25s
552 tests ±0  545 ✅ ±0  7 💤 ±0  0 ❌ ±0 
554 runs  ±0  547 ✅ ±0  7 💤 ±0  0 ❌ ±0 

Results for commit eb5071d. ± Comparison against base commit 25f9f72.


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
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