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

Deadline gets "pushed out" on each contest #716

Merged
merged 24 commits into from
Feb 13, 2023

Conversation

ffakenz
Copy link
Contributor

@ffakenz ffakenz commented Feb 8, 2023

🥧 To be aligned with the contest spec, we are now pushing the contestation deadline using the previously defined contestation period.

🥧 The contestation deadline will only be pushed if the signer of the contest transaction is not the last one to contest.

To check before merging:

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

@ffakenz ffakenz changed the title push deadline on contest deadline gets "pushed out" on each contest Feb 8, 2023
@github-actions
Copy link

github-actions bot commented Feb 8, 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-13 13:31:44.524764073 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 7bb44e248f92ae5d2c4c744244b469d59a5bfa8a5d8ce9b6b27e5750 5530
νCommit 70c545fc894ada81ad46715bac1a11fa755b3e3a1d94f03254a4d397 2473
νHead c1fa50bb6fb1b7f84f4b103bcfb6f71eaeb4de93ddcab99729c122fb 9928

Cost of Init Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 5048 9.48 3.74 0.48
2 5252 13.99 5.55 0.53
3 5457 13.92 5.46 0.54
5 5871 17.07 6.65 0.59
10 6894 27.61 10.73 0.75
46 14275 98.81 38.16 1.85

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 630 21.18 8.56 0.41

Cost of CollectCom Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 13136 22.03 8.81 0.97
2 13497 36.59 14.79 1.15
3 13983 56.53 23.03 1.39
4 14048 73.47 30.07 1.58
5 14614 98.58 40.57 1.88

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 10542 16.32 7.00 0.80
2 10728 18.55 8.27 0.83
3 10661 16.57 7.11 0.80
5 11260 23.22 10.94 0.91
10 12060 29.31 14.27 1.02
49 15295 64.68 29.88 1.56

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 10570 21.44 8.95 0.85
2 10743 22.73 9.67 0.88
3 10935 24.98 10.94 0.91
5 11231 28.38 12.52 0.96
10 12090 37.27 17.24 1.11
35 16253 81.13 39.96 1.81

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 14877 24.53 10.10 1.08
2 15229 42.02 17.76 1.29
3 15440 58.79 24.90 1.48
4 15766 83.06 35.60 1.77

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 14920 11.15 4.82 0.93
2 14950 12.63 5.68 0.95
3 14855 13.15 6.16 0.95
5 14924 16.45 8.02 1.00
10 15109 23.83 12.32 1.10
20 15465 39.09 21.13 1.30
42 16325 73.05 40.68 1.75

@v0d1ch v0d1ch force-pushed the ensemble/push-deadline-on-contest branch from 68d3dd3 to 4b9781b Compare February 9, 2023 10:33
CHANGELOG.md Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Feb 9, 2023

Test Results

285 tests  ±0   279 ✔️ ±0   14m 18s ⏱️ +8s
  97 suites ±0       6 💤 ±0 
    5 files   ±0       0 ±0 

Results for commit 373f393. ± Comparison against base commit 6ca421b.

♻️ This comment has been updated with latest results.

@v0d1ch v0d1ch force-pushed the ensemble/push-deadline-on-contest branch from c440a93 to 7402b75 Compare February 9, 2023 13:25
Copy link
Collaborator

@ch1bo ch1bo left a comment

Choose a reason for hiding this comment

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

Only the contestation period needs to be checked now. Otherwise looks good!

hydra-plutus/src/Hydra/Contract/Head.hs Outdated Show resolved Hide resolved
hydra-plutus/src/Hydra/Contract/Head.hs Show resolved Hide resolved
hydra-node/test/Hydra/Chain/Direct/Contract/FanOut.hs Outdated Show resolved Hide resolved
healthyFanoutDatum :: Head.State
healthyFanoutDatum =
Head.Closed
{ snapshotNumber = 1
, utxoHash = toBuiltin $ hashUTxO @Tx healthyFanoutUTxO
, parties = partyToChain <$> arbitrary `generateWith` 42
, contestationDeadline = posixFromUTCTime healthyContestationDeadline
, contestationPeriod = healthyContestationPeriod
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could: even use an arbitrary contestation period.

hydra-node/test/Hydra/Chain/Direct/StateSpec.hs Outdated Show resolved Hide resolved
@ffakenz ffakenz force-pushed the ensemble/push-deadline-on-contest branch from 65596b7 to 0d97dca Compare February 10, 2023 19:03
Copy link
Collaborator

@ch1bo ch1bo left a comment

Choose a reason for hiding this comment

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

Change looks good now. Only very minor comments on the mutation tests left (flakyness)

hydra-node/test/Hydra/Chain/Direct/Contract/Contest.hs Outdated Show resolved Hide resolved
@ch1bo ch1bo force-pushed the ensemble/push-deadline-on-contest branch from 373f393 to b09742d Compare February 13, 2023 12:19
@v0d1ch v0d1ch merged commit dc6b3ef into master Feb 13, 2023
@v0d1ch v0d1ch deleted the ensemble/push-deadline-on-contest branch February 13, 2023 12:22
@ch1bo ch1bo changed the title deadline gets "pushed out" on each contest Deadline gets "pushed out" on each contest Feb 24, 2023
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.

3 participants