Skip to content

Commit

Permalink
Only 8 participants are possible consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed Oct 4, 2024
1 parent f9e07ce commit 665cc17
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ changes.

- **BREAKING** Rewrite of the commit script in aiken:
- This makes `abort` and `collectCom` transactions more efficient and results
in a new maximum number of head participants being `9`.
in a new maximum number of head participants being `8`.
- Changes script hashes in `hydra-plutus`

## [0.19.0] - 2024-09-13
Expand Down
9 changes: 5 additions & 4 deletions hydra-node/src/Hydra/Chain.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ import Test.QuickCheck.Instances.Time ()
maxMainnetLovelace :: Coin
maxMainnetLovelace = Coin 100_000_000

-- | Hardcoded limit for maximum number of parties in a head protocol
-- The value is obtained from calculating the costs of running the scripts
-- and on-chan validators (see 'computeCollectComCost' 'computeAbortCost')
-- | Hardcoded limit for maximum number of parties in a head protocol The value
-- is obtained from calculating the costs of running the scripts and on-chan
-- validators (see 'computeCollectComCost' 'computeAbortCost'). A too high
-- enough number would be detected by property and acceptance tests.
maximumNumberOfParties :: Int
maximumNumberOfParties = 9
maximumNumberOfParties = 8

-- | Data type used to post transactions on chain. It holds everything to
-- construct corresponding Head protocol transactions.
Expand Down
4 changes: 2 additions & 2 deletions hydra-node/test/Hydra/Chain/Direct/StateSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ prop_splitUTxO utxo =

prop_canCloseFanoutEveryCollect :: Property
prop_canCloseFanoutEveryCollect = monadicST $ do
let maxParties = 10
ctx@HydraContext{ctxContestationPeriod} <- pickBlind $ genHydraContext maxParties
let moreThanSupported = maximumNumberOfParties * 2
ctx@HydraContext{ctxContestationPeriod} <- pickBlind $ genHydraContext moreThanSupported
cctx <- pickBlind $ pickChainContext ctx
-- Init
txInit <- pickBlind $ genInitTx ctx
Expand Down

0 comments on commit 665cc17

Please sign in to comment.