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

No need to check quantity, PT distribution when minting tokens #712

Closed
wants to merge 8 commits into from

Conversation

ffakenz
Copy link
Contributor

@ffakenz ffakenz commented Feb 7, 2023

Actors check off-chain whether an initTx is well-formed during observation

  • Determine minted quantities
  • PT tokens are well distributed
  • and whether PTs are paid to v_initial.
  • CHANGELOG is up to date
  • Documentation is up to date

@github-actions
Copy link

github-actions bot commented Feb 7, 2023

Test Results

286 tests  +1   280 ✔️ +1   14m 1s ⏱️ -25s
  97 suites ±0       6 💤 ±0 
    5 files   ±0       0 ±0 

Results for commit f2cca96. ± Comparison against base commit c37f6b4.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 7, 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-02-08 15:32:19.615495649 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 6e4ce2bd32260424babefe087c2a5ee0a414745fe0281d5608ae9bf8 5530
νCommit 03f2e29fd352f8c2961ad2f61d87a48f88bf01ea6c079b46a3184aee 2547
νHead 13a1c9e1bf086b3de264fb6d411a0691bfb557d4439bd625c28fea80 9722

Cost of Init Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 5016 9.35 3.68 0.47
2 5224 12.55 4.95 0.52
3 5426 15.68 6.19 0.56
5 5836 18.45 7.22 0.61
10 6862 27.39 10.64 0.75
45 14038 98.79 38.21 1.84

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 633 21.10 8.53 0.41

Cost of CollectCom Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 12898 21.41 8.51 0.95
2 13250 36.27 14.60 1.13
3 13709 55.88 22.67 1.37
4 14094 77.90 31.77 1.63

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 10320 15.62 6.66 0.78
2 10484 16.81 7.35 0.80
3 10683 18.82 8.53 0.83
5 11012 22.32 10.42 0.89
10 11867 30.10 14.68 1.02
50 15215 69.27 31.91 1.61

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 10373 16.47 7.13 0.79
2 10538 18.25 8.05 0.82
3 10711 19.79 8.88 0.85
5 11041 22.46 10.37 0.89
10 11860 30.08 14.55 1.02
36 16216 69.96 36.24 1.69

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 14638 24.47 10.08 1.06
2 15063 43.29 18.36 1.30
3 15344 63.44 27.12 1.53
4 14968 68.73 28.90 1.57
5 15395 97.03 41.35 1.91

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 14537 10.31 4.48 0.91
2 14639 11.92 5.39 0.93
3 14739 13.82 6.42 0.96
5 14747 16.50 8.03 0.99
10 14992 24.50 12.58 1.10
20 15414 40.14 21.54 1.31
52 16371 87.87 49.32 1.94

@@ -52,10 +52,11 @@ validate initialValidator headValidator seedInput action context =
validateTokensMinting :: ValidatorHash -> ValidatorHash -> TxOutRef -> ScriptContext -> Bool
validateTokensMinting initialValidator headValidator seedInput context =
traceIfFalse "minted wrong" $
participationTokensAreDistributed currency initialValidator txInfo nParties
seedInputIsConsumed
-- TODO remove below checks and Init mutations
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this will be addressed once the off-chain logic is tested.

this is also needed to be removed in order to generate valid cluster specs.

@ffakenz ffakenz force-pushed the task/gap_check_init_tx_off_chain branch from 9aaee77 to f66b0ed Compare February 8, 2023 13:20
@ffakenz ffakenz force-pushed the task/gap_check_init_tx_off_chain branch from ae02d0f to f2cca96 Compare February 8, 2023 15:04
@ffakenz
Copy link
Contributor Author

ffakenz commented Feb 8, 2023

Marked as invalid.

Following this approach is called "Limited Minting Policy", but although this GAP currently exists, we want to move forward with a different approach called "Full Minting Policy".

@ffakenz ffakenz closed this Feb 8, 2023
@ffakenz ffakenz deleted the task/gap_check_init_tx_off_chain branch March 27, 2023 13:37
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.

1 participant