Skip to content

Commit

Permalink
Remove some spec related todo's as the spec is updated
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch committed Jan 28, 2025
1 parent 56274fa commit 8e47bbf
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ changes.

- **BETA** hydra-node now supports incremental commits in beta mode. We would like to test out this feature
with the community members building on Hydra. This feature means you can commit funds to a Head while it is running.
TODO: Implement missing spec changes.

- There is a new `--deposit-deadline` argument to hydra-node that determines the maximum time for the hydra-node to detect a deposit.
After this time has passed users can recover a deposit in case it wasn't observed previously.
Expand Down
1 change: 0 additions & 1 deletion hydra-plutus/src/Hydra/Contract/Deposit.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import PlutusTx qualified

data DepositRedeemer
= -- | Claims already deposited funds.
-- FIXME: Make sure to change the spec and add head CS to the Claim redeemer.
Claim CurrencySymbol
| -- | Recovers m number of deposited outputs.
Recover Integer
Expand Down
3 changes: 0 additions & 3 deletions hydra-plutus/src/Hydra/Contract/Head.hs
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@ checkIncrement ::
IncrementRedeemer ->
Bool
checkIncrement ctx@ScriptContext{scriptContextTxInfo = txInfo} openBefore redeemer =
-- FIXME: spec is mentioning the n also needs to be unchanged - what is n here? utxo hash?
-- "parameters cid, 𝑘̃ H , 𝑛, 𝑇 stay unchanged"
mustNotChangeParameters (prevParties, nextParties) (prevCperiod, nextCperiod) (prevHeadId, nextHeadId)
&& mustIncreaseVersion
&& mustIncreaseValue
Expand Down Expand Up @@ -438,7 +436,6 @@ checkClose ctx openBefore redeemer =
version == 0
&& snapshotNumber' == 0
&& utxoHash' == initialUtxoHash
-- FIXME: reflect the new CloseAny redeemer in the spec as well
CloseAny{signature} ->
traceIfFalse $(errorCode FailedCloseAny) $
snapshotNumber' > 0
Expand Down
5 changes: 1 addition & 4 deletions hydra-plutus/src/Hydra/Contract/HeadState.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ data ClosedDatum = ClosedDatum
-- ^ Spec: s
, utxoHash :: Hash
-- ^ Spec: η. Digest of snapshotted UTxO
-- | TODO: add alphaUTxOHash to the spec
, alphaUTxOHash :: Hash
, omegaUTxOHash :: Hash
-- ^ Spec: ηΔ. Digest of UTxO still to be distributed
Expand Down Expand Up @@ -182,10 +181,8 @@ data Input
| Abort
| Fanout
{ numberOfFanoutOutputs :: Integer
, -- TODO: add this to the spec
numberOfCommitOutputs :: Integer
, numberOfCommitOutputs :: Integer
, numberOfDecommitOutputs :: Integer
-- ^ Spec: n
}
deriving stock (Generic, Show)

Expand Down
3 changes: 1 addition & 2 deletions hydra-tx/src/Hydra/Tx/Fanout.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ fanoutTx scriptRegistry utxo utxoToCommit utxoToDecommit (headInput, headOutput)
toScriptData $
Head.Fanout
{ numberOfFanoutOutputs = fromIntegral $ length $ toList utxo
, -- TODO: Update the spec with this new field 'numberOfCommitOutputs'
numberOfCommitOutputs = fromIntegral $ length orderedTxOutsToCommit
, numberOfCommitOutputs = fromIntegral $ length orderedTxOutsToCommit
, numberOfDecommitOutputs = fromIntegral $ length orderedTxOutsToDecommit
}

Expand Down

0 comments on commit 8e47bbf

Please sign in to comment.