ci: run file hygiene checks without reusable actions
Signed-off-by: Yurii Shynbuiev <[email protected]>
Signed-off-by: Yurii Shynbuiev <[email protected]>
Signed-off-by: Yurii Shynbuiev <[email protected]>
Signed-off-by: Yurii Shynbuiev <[email protected]> # Conflicts: # .github/workflows/pull-request.yml
Signed-off-by: Yurii Shynbuiev <[email protected]>
Signed-off-by: Yurii Shynbuiev <[email protected]>
Signed-off-by: Yurii Shynbuiev <[email protected]>
We can finally drop the mocked certificates by accessing the aggregated certificates from the LeiosVoteState
When snapshotVersion < version (an IncrementTx confirmed on L1 after the last snapshot), computeFullFanoutUTxO includes utxoToCommit in the full fanout set. After a PartialFanoutTx distributes all other outputs, a FinalPartialFanoutTx must distribute the pending deposit UTxO alone. Adds genClosedStateWithPendingCommit to the testlib and a property test that verifies finalPartialFanout succeeds in this scenario — guarding against the StaleChainState failure observed in practice when the in-memory deposit UTxO accumulator element diverges from the on-chain commitment. Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
genStOpen inflates the head UTxO by u0Value but genCloseTx was not adjusting it before calling unsafeClose. With mustPreserveHeadValue now using strict equality (instead of geq), the head value must be exactly headAdaOverhead + confirmedUTxO + decommit at close time, or the Plutus script fires H65. Adjust the UTxO in genCloseTx the same way genClosedStateForFanout and genFanoutTx already do. Signed-off-by: Sasha Bogicevic <[email protected]>
genStOpen inflates the head UTxO by u0Value but leaves headAdaOverhead in the open datum unchanged. genCloseTx now adjusts the head UTxO value to headAdaOverhead + confirmedUTxOValue + decommitValue before building the close tx, so closeTx computes the correct headAdaOverhead' for the closed datum (fixes H65). forAllClose was discarding the adjusted UTxO returned by genCloseTx and recomputing it from the original inflated OpenState, causing the evaluator to see a different input value than what the tx was built against (fixes H4/HeadValueIsNotPreserved). Signed-off-by: Sasha Bogicevic <[email protected]>
When a DecrementTx was applied on-chain before the head was closed (snapshotVersion != openVersion), partialFanout passed fullUTxO to buildAndVerifyAccumulator. But the closed datum's accumulatorCommitment was built from utxoForProof (snapshot UTxO including the decommit set), so the check always failed with StaleChainState, leaving the head stuck. Separate the accumulator proof input from the distribution set by adding a proofUTxO parameter to partialFanout and findFittingFanoutTx. The FanoutTx call site now passes utxoForProof as proofUTxO so it matches what the closed datum was committed to, while fullUTxO (the actual distribution set) is used unchanged for fanout outputs. Signed-off-by: Sasha Bogicevic <[email protected]>
deposit.ak checks the head redeemer constructor index via raw CBOR arithmetic; if Increment ever shifts from index 0, deposits are permanently locked. The test catches that at build time. Signed-off-by: Sasha Bogicevic <[email protected]>
Merge the two-callback interface (mkTx + fitsCheck) into one (Int -> m (Maybe tx)) where Nothing means doesn't fit and Just tx means fits. This enforces at the type level that construction and checking always happen together. Also rename mkTxM to buildTx in findFittingFanoutTx's where bindings. Signed-off-by: Sasha Bogicevic <[email protected]>
Three coverage gaps in the contract test suite are filled:
- CloseAny: new test module exercising the NoThing → CloseAny redeemer
path, including the unique on-chain snapshotNumber > 0 check (21
mutations; signature/number failures all map to FailedCloseAny because
that path wraps both checks in a single traceIfFalse).
- CloseInitial: expanded from 2 to 15 mutations, adding the three
CloseInitial-specific checks (snapshotNumber == 0, version == 0,
accumulatorCommitment == G1 generator → FailedCloseInitial) plus the
ten shared close checks (parties, headId, contestation period, validity
bounds, minting, contesters, value, required signer).
- ContestInc: new test module contesting with a commit-type snapshot
(utxoToCommit = Just depositedUTxO), exercising the ToCommit
accumulator commitment path that ContestDec (decommit path) left
uncovered.
Signed-off-by: Sasha Bogicevic <[email protected]>