cardano-scaling / hydra

Implementation of the Hydra Head protocol
https://hydra.family/head-protocol/
Apache License 2.0
274 stars 84 forks source link

Cannot close head in Conway #1545

Closed ch1bo closed 1 month ago

ch1bo commented 1 month ago

Context & versions

Hydra commit 209de1dd8c5ae484a45a4db3af043c4a9d271306, but any version should have this issue.

Trying to close the head we had open on preview, opened in Babbage and now to close in Conway.

Steps to reproduce

  1. Open a head in Babbage
  2. Network forks into Conway
  3. Try to close the head

Actual behavior

Failed to post tx:

{"failureReason":"TxValidationErrorInCardanoMode (ShelleyTxValidationError ShelleyBasedEraConway (ApplyTxError (ConwayUtxowFailure (UtxoFailure (FeeTooSmallUTxO (Coin 1882369) (Coin 1746353))) :| [])))","tag":"FailedToPostTx"}

https://github.com/user-attachments/assets/34cae02e-9207-4834-b76c-c766f7698731

Expected behavior

Hypothesis

The fee calculation (also for Babbage transactions) changed in Conway era / protocol version 9 to include costs proportional to reference script size. Our internal wallet seems to not incorporate that or is slightly off.

Weirdly, this was not captured by our end-to-end test that opens a head in babbage, forks into conway and closes a head again?

Could be related to the cost model; does that change when the eras are forked in our tests?

ch1bo commented 1 month ago

Reproduced by setting "minFeeRefScriptCostPerByte": 15 in our hydra-cluster/config/devnet/genesis-conway.json used for end to end tests.