Hydra Poc Versions Save

Implementation of the Hydra Head protocol

0.16.0

1 month ago

Major changes to the transaction representation in the API, more preparations for Conway era and EventSource/EventSink abstractions for streaming plugins.

:warning: Warning There are still several known issues, which are explained in the documentation.

Build artifacts

Hydra Scripts

Transaction IDs to be used as --hydra-scripts-tx-id when running hydra-node on common networks are now also stored in the repository:

  • preview: 1f34e4ee2404a5e4fc8ef970b7b8717af34c1a5a22107b82cde79c5d11da93b9
  • preprod: 6264cee4d5eab3fb58ab67f3899ecbcc0d7e72732a2d9c1c5d638115db6ca711
  • mainnet: 2d52e5787b198daeb280f9de63e5dec126b1843b050e85b1642ff8e47cb6de73

Compatible / tested with

  • cardano-node: 8.9.0
  • cardano-cli: 8.20.3.0
  • mithril: 2412.0

Upgrade instructions

This release contains breaking changes of the persisted data and on-chain scripts. This means that you'll need to apply the following procedure to upgrade all the nodes currently running a head:

  1. Close and fanout the head
  2. Stop hydra-node
  3. Remove persistent files stored in --persistence-dir, in particular server-output, acks and state
  4. Upgrade hydra-node to this version
  5. Upgrade cardano-node to compatible version (above)
  6. Start new hydra-node version with new --hydra-scripts-tx-id (above)
  7. Open a new head

Changelog

  • BREAKING Hydra scripts changed due to updates in the plutus toolchain:

    • Overall slight increase in script size.
    • 50% less memory usage in close and contest transactions.
    • Slightly less memory usage in abort and may be possible with 6 parties now.
  • BREAKING Transaction serialization on hydra-node API and persisted data changed:

    • All transactions are now only serialized as CBOR-encoded envelopes.
    • This was needed to avoid accidentally changing transaction ids between Cardano era transaction formats.
    • See API reference for more details on the format.
  • BREAKING Change to the hydra-node logs, monitoring and removal of log-filter executable:

    • Renamed the Event data types to Input and consequently log items like BeginEvent to BeginInput.
    • Changed structure of LogicOutcome entries.
    • Added node-level log entry when an input was DroppedFromQueue.
    • In course of this, the log-filter executable was removed as nobody is actively using it and other off-the-shelf utilities to manipulate structured JSON logs (jq is already quite powerful) are recommended.
    • Renamed prometheus metric hydra_head_events -> hydra_head_inputs.
  • Introduce EventSource and EventSink interfaces in hydra-node:

    • These handles can now be used as "extension points" to make the hydra-node store and load its state differently or expose StateEvents to other, external services.
    • Internal refactoring of persistence mechanism as event source and sink in a backward-compatible way.
    • More details can be found in ADR21
  • Add metadata to identify Hydra protocol transactions created by hydra-node.

  • Provide more details about why a command failed. Added the state of the head logic at the point of failure.

  • Fix a bug where the hydra-node would not correctly observe a contest transaction and fail to fanout a head #1260.

  • Add contestationDeadline to the HeadIsContested output on the hydra-node API.

  • Add --sanchonet option to hydra-cluster binary.

  • Enhance hydra-cluster --devnet mode to produce a constant stream of snaphsots by re-spending the sandbox UTxO.

  • Reduce cost of transactions submitted by hydra-node by better estimating fees in internal wallet #1315.

  • Fix conversion of Conway blocks in hydra-node and hydra-chain-observer. This also includes tests that verify hydra-node working on Conway networks like sanchonet and the hydra-explorer observing heads on sanchonet.

  • Fix a bug in the contest observation where contesters were extracted from the input instead of the output datum. #1266

New Contributors

Contributors

Contributors: @v0d1ch @abailly-iohk @locallycompact @ffakenz @ch1bo

Full Changelog: https://github.com/input-output-hk/hydra/compare/0.15.0...0.16.0

0.15.0

3 months ago

Run a hydra-node in offline mode, improved errors when connecting to an incompatible chain and support for upcoming Conway era (heads survive the hard-fork, but the L2 ledger still is only Babbage)

:warning: Warning There are still several known issues, which are explained in the documentation.

Build artifacts

Hydra Scripts

Transaction IDs to be used as --hydra-scripts-tx-id when running hydra-node on common networks are now also stored in the repository:

  • preview: c21b70a719112f76d318abcfee95499a27556ef4a18b1c62bc38e4b9c07ae3a6
  • preprod: 8ce483e2d4b81f9254392afda1f85d1e123165665593228c39064691903f431a
  • mainnet: 7d998b617526d827dd69a495f5d5dc2c5e293b86a62ad61cb2fb5f2503cd87f0

Compatible / tested with

  • cardano-node: 8.7.3
  • cardano-cli: 8.17.0.0
  • kupo: 2.7

Upgrade instructions

This release contains breaking changes of the persisted data and on-chain scripts. This means that you'll need to apply the following procedure to upgrade all the nodes currently running a head:

  1. Close and fanout the head
  2. Stop hydra-node
  3. Remove persistent files stored in --persistence-dir, in particular server-output and state
  4. Upgrade hydra-node to this version
  5. Upgrade cardano-node to compatible version (above)
  6. Start new hydra-node version with new --hydra-scripts-tx-id (above)
  7. Open a new head

Changelog

  • BREAKING Remove head state from hydra-node chain layer 1196:

    • Not maintain head state in the chain layer anymore and all decision making (whether it's "our" head) is now fully contained in the logic layer.
    • This is a breaking change on the persisted state file, which now only stores so-called spendableUTxO. This raises a PersistenceException if an incompatible state file is loaded.
    • Heads need to be closed before upgrade to this version, as wiping state in the --persistence-dir is needed.
    • This also changes the NodeOptions log output because of internal restructuring of chain layer configuration.
  • New offline sub-command for hydra-node #1118, #1222:

    • Initializes a head with given --initial-utxo parameter, and does not connect to the Cardano network.
    • Transactions submitted on the L2 are validated as usual, where the offline chain simulates time passing in slots.
    • The --ledger-genesis option allows to give a shelley genesis file to configure start time and slot length of the simulated chain time.
  • Prepare hydra-node for the upcoming Conway hard-fork #1177:

    • Interactions with cardano-node are updated to work in both, Babbage and Conway era.
    • Unsupported eras are reported as error when starting.
  • Add a default for hydra-node --node-id ("hydra-node-1") to simplify configuration.

  • Fix hydra-node API reference & schema for /protocol-parameters #1241. This now matches the JSON returned by cardano-cli query protocol-parameters, expected at hydra-node --ledger-protocol-parameters and produced by the API endpoint.

  • The hydra-cluster binary can bootstrap cardano-nodes running on public networks using mithril-client.

  • BREAKING Internal changes to hydra-cardano-api:

    • Renamed HasMultiAsset type class to IsMaryEraOnwards. Use maryEraOnwards to produce witnesses for features from mary onwards.
    • Renamed HasScriptData type class to IsAlonzoEraOnwards. Use alonzoEraOnwards to produce witnesses for features from alonzo onwards.
    • Renamed HasInlineDatums type class to IsBabbageEraOnwards. Use babbageEraOnwards to produce witnesses for features from babbage onwards.

Full Changelog: https://github.com/input-output-hk/hydra/compare/0.14.0...0.15.0

Contributors

Contributors to this release: @cardenaso11 @v0d1ch @abailly-iohk @locallycompact @ffakenz @ch1bo

0.14.0

5 months ago

Hydra release which makes the hydra network resilient to disconnects, simplifies the layer 1 protocol using inline datums and includes a hydra-chain-observer executable.

:warning: Warning There are still several known issues, which are explained in the documentation.

Build artifacts

  • 📦 Linux x86_64 binaries: here
  • 📦 MacOS ARM64 binaries: here
  • 🐋 Docker image: here

Hydra Scripts

Transaction IDs to be used as --hydra-scripts-tx-id when running hydra-node on common networks are now also stored in the repository:

  • preview: 64deee72cd424d957ea0fddf71508429ecb65fea83a041fe9b708fc2ca973a8e
  • preprod: d8ba8c488f52228b200df48fe28305bc311d0507da2c2420b10835bf00d21948
  • mainnet: 3ac58d3f9f35d8f2cb38d39639232c10cfe0b986728f672d26ffced944d74560

Compatible / tested with

  • cardano-node: 8.1.2
  • cardano-cli: 8.1.2
  • kupo: 2.7

Upgrade instructions

This release contains breaking changes of the persistence and on-chain scripts. This means that you'll need to apply the following procedure to upgrade all the nodes running a head:

  1. Close and fanout the head
  2. Stop hydra-node
  3. Remove persistent files stored in --persistence-dir, in particular server-output and state
  4. Upgrade hydra-node to this version
  5. Upgrade cardano-node to compatible version (above)
  6. Start new hydra-node version with new --hydra-scripts-tx-id (above)
  7. Open a new head

Changelog

  • BREAKING Multiple changes to the Hydra Head protocol on-chain:

    • Sign the head identifier as part of snapshot signature and verify it on-chain. This fully addresses security advisory CVE-2023-42806.

    • Switched to using inline datums instead of (optionally) published datums in transactions. #1162

    • Upgraded toolchain to GHC 9.6 and a newer plutus-tx compiler.

  • BREAKING Internal persisted chain state serialization changed when switching to inline datums. Make sure to close heads before and wipe the --persistence-dir before using this hydra-node version.

  • BREAKING Introduced messages resending logic in the Network layer to improve reliability in the face of connection issues. #188 This persists network messages on disk in order to gracefully handle crashes and detects inconsistencies between persisted state and configuration.

  • Increased maximum number of parties to 5. This is possible to small optimizations on the Head protocol transactions.

  • Removed hard-coded deposit of 2₳ from internal wallet. Now the wallet does only use as much deposit for script outputs as minimally needed and reduces the Ada locked throughout a head life-cycle. #1176

  • Clients are notified when head initialization is ignored via a new IgnoredHeadInitializing API server output. This helps detecting misconfigurations of credentials and head parameters (which need to match). #529

  • Removed false positive PostTxOnChainFailed error from API outputs when the collect transaction of another hydra-node was "faster" than ours. #839

  • Hydra node API submit-transaction endpoint now accepts three types of encoding: Base16 encoded CBOR string, a TextEnvelope with CBOR and full JSON. #1111

  • Improved gen-hydra-keys command to not overwrite keys if they are present already. #1136

  • Add a hydra-chain-observer executable to subscribe to a chain and just observe Hydra Head transactions (with minimal information right now). #1158

  • Fixed hydra-tui key bindings for exiting in dialogs. #1159

Contributors

Other contributors to this release: @v0d1ch @abailly-iohk @locallycompact @ffakenz @matiwinnetou @ch1bo

Full Changelog: https://github.com/input-output-hk/hydra/compare/0.13.0...0.14.0

0.13.0

7 months ago

Release focusing on various security fixes, ensuring users can commit scripts using inline datums, simplifying event storing, an important update to our security policy, and lots of other fixes.

Warning As this release fixes a number of security issues, users running Hydra heads on mainnet are strongly advised to close them and upgrade their nodes to this version

Warning There are several known issues, which are explained in the documentation.


Built artifacts

  • :package: Static x86_64-linux binaries: here (also attached)

  • :whale: Docker image: here

Hydra Scripts

Transaction IDs to be used as --hydra-scripts-tx-id when running hydra-node on the following networks:

  • preview: 1e00c627ec4b2ad0b4aa68068d3818ca0e41338c87e5504cda118c4050a98763 checked in smoke test #132
  • preprod: f917dcd1fa2653e33d6d0ca5a067468595b546120c3085fab60848c34f92c265 checked in smoke test #133
  • mainnet: 989e3ab136a2cdd3132a99975e76e02f62bcb03ba64ddbb5d2dfddffca8d390d checked in smoke test #131

This release contains breaking changes of the persistence and on-chain scripts and you'll need to apply the following procedure to upgrade all the nodes running a head:

  1. Close the head
  2. Stop hydra-node
  3. Remove persistent files stored in --persistence-dir, in particular server-output and state
  4. Upgrade hydra-node version
  5. Upgrade cardano-node version to 8.1.2
  6. Start new hydra-node version with new --hydra-scriptx-tx-id
  7. Open a new head

New Security Advisories

  • CVE-2023-42448: Contestation deadline can be tempered with after a head is closed
  • CVE-2023-42449: Participation tokens can be extracted from initial script using forged policy id
  • CVE-2023-38701: Committed UTxO can be spent arbitrarily (this fix was actually released in version 0.12.0)

Thanks to @jmhrpr for reporting those issues.


  • BREAKING

    • Update to plutus 1.9. This changes the script hashes.
    • Changes to hydra-plutus scripts.
  • Query at the tip for local cardano-node queries. 1053

  • Add option to draft a commit tx using inline datums. 1052

  • Remove hydra-tools package.

    • Move functionality to generate hydra keys to the hydra-node executable. 1031
  • Changes to hydra-node state persistency:

    • Remove the recursive definition of the chain state.
    • This makes the event store more lightweight and easier to read and work with. 1049

    Full Changelog: https://github.com/input-output-hk/hydra/compare/0.12.0...0.13.0


New Contributors

Other contributors to this release: @abailly-iohk @ch1bo @v0d1ch @ffakenz @pgrange

0.12.0

8 months ago

Release focusing on changes to the L2 protocol, ensuring authenticated messages and removing redundancy of submitted transactions. Performance improvements on persistence and communicated network messages are expected in this release. Adds several endpoints to the API and removes the internal commit via websockets feature. Last, but not least, this release contains several security fixes.

Warning There are several known issues, which are explained in the documentation.


Built artifacts

  • :package: Static x86_64-linux binaries: here (also attached)

  • :whale: Docker image: here

Hydra Scripts

Transaction IDs to be used as --hydra-scripts-tx-id when running hydra-node on the following networks:

  • preview: 4793d318ec98741c0eebff7c62af6389a860c6e51c4fa1961cc5b7eab5a46f58 checked in smoke test #126
  • preprod: 02aa4c107cab6b541d6f12cda9604b1164a3d5b14dd96c3b6057bcf6c2ab2ccd checked in smoke test #127
  • mainnet: eb4c5f213ffb646046cf1d3543ae240ac922deccdc99826edd9af8ad52ddb877 checked in smoke test #128

This release contains breaking changes of the persistence and on-chain scripts and you'll need to apply the following procedure to upgrade all the nodes running a head:

  1. Close the head
  2. Stop hydra-node
  3. Remove persistent files stored in --persistence-dir, in particular server-output and state
  4. Upgrade hydra-node version
  5. Upgrade cardano-node version to 8.1.2
  6. Start new hydra-node version with new --hydra-scriptx-tx-id
  7. Open a new head

  • BREAKING Support new cardano-node version 8.1.2 #1015

    • Updated chain client and internal (layer 2) ledger versions to support the new cardano-node versions. No direct impact on hydra clients expected.

    • The JSON encoding of transaction as used at the hydra-node API changed slightly. Verification key witnesses (keys field witnesses) are not double wrapped cbor arrays anymore. Do not rely on this serialization as we will change this again into a more "cardanonical" form. Alternative: Use cbor=true query parameter to receive full CBOR encoded transactions.

    • The last stable cardano-node version 1.35.7 is not compatible anymore.

  • BREAKING Remove the DEPRECATED Commit websocket command to commit funds held by the hydra-node internal wallet. Use the external commit feature instead. Also rename the ErrNoFuelUTxOFound to ErrNoUTxOFound. #1018

  • BREAKING Changes to Hydra scripts due to upgrading our plutus version and toolchain to GHC 9.2.8. #1005

  • BREAKING Change persisted state to be a sequence of events instead #999. This increases the performance of the hydra-node as less data needs to be written and prepares internal architecture for more event-sourced improvements.

  • BREAKING Introduce authenticated network messages #965:

    • Peers will sign messages before broadcasting them to other peers, and verify signature of received messages is from a known party and of course valid.
  • BREAKING Layer 2 protocol change:

    • Wait for all transactions requested in a snapshot to be seen before acknowledging it, and only send transaction ids in snapshot requests #904.
  • Enhanced hydra-node api.

    • New HTTP endpoint (POST /cardano-transaction) to submit a transaction on L1 #1001.

    • Greetings message now contains also the hydra-node version #985.

    • New HTTP endpoint (GET /protocol-parameters) which provides the current protocol parameters #989.

  • Fixed a bug in hydra-node (on-chain protocol not affected) where multisignature verification would silently ignore certain keys in case the list of verification keys is not of same length as the list of signatures.

  • Fixed a bug in the hydra-tui dialogs where recipient and UTxO to spend where not correctly selected #1025.

  • BREAKING Changes to hydra-cardano-api #1015:

    • Drop UsingRawBytesHex as it is available upstream in cardano-api now.
    • Remove totalExecutionCost as cardano-ledger provides getMinFeeTx now.
    • Add BundledProtocolParameters pattern for latest Era to Hydra.Cardano.Api.
    • Add ledgerEraVersion for the latest Era en-/decoder version.
    • Change minUTxOValue to take BundledProtocolParameters.
    • Add fromLedgerMultiAsset helper as transactions only mint MultiAsset.
  • Created hydra-plutus-extras package to re-use some utilities better between packages #1016.

    Full Changelog: https://github.com/input-output-hk/hydra/compare/0.11.0...0.12.0


New Contributors

Other contributors to this release: @abailly-iohk @ch1bo @v0d1ch @ffakenz @pgrange

0.11.0

10 months ago

Release to complete the L2 ledger isomorphism by supporting timed transactions and functional changes related to committing funds to a Hydra Head. Notably, external commits should be used now and this release does deprecate the "internal commits" feature.

:warning: IMPORTANT: There are several known issues, which are explained in the documentation.


Built artifacts

  • :package: Static x86_64-linux binaries: here (also attached)
  • :whale: Docker image: here

Hydra Scripts

Transaction IDs to be used as --hydra-scripts-tx-id when running hydra-node on the following networks:

  • preview: 90acbeb0ebece3b5319625eedca3f6514870c9414872d9e940c6b7d7b88178fd checked in smoke test #111
  • preprod: 010f68ad75cda7983b68a7691ba1591fa9ce4cfc03ac35d1c6c90cae4b48f849 checked in smoke test #116 (see also #960)
  • mainnet: eb4c5f213ffb646046cf1d3543ae240ac922deccdc99826edd9af8ad52ddb877 checked in smoke test #117

This release contains breaking changes of the persistence and on-chain scripts and you'll need to apply the following procedure to upgrade all the nodes running a head:

  1. Close the head
  2. Stop hydra-node
  3. Remove persistent files stored in --persistence-dir, in particular server-output and state
  4. Upgrade hydra-node version
  5. Start new hydra-node version with new --hydra-scriptx-tx-id and updated command line options.
  6. Open a new head

  • BREAKING Allow to commit multiple UTxO #774

    • This changes hydra-plutus scripts to allow commit transactions which spend multiple UTxOs into a Hydra head.
    • Removes the MoreThanOneUTxOCommitted server output on the API.
  • Suport commits from external wallets #215

    • Added the /commit HTTP endpoint to the hydra-node for creating a draft commit transaction to commit requested UTxO into a head. This transaction can be signed and submitted to the network by the hydra client now instead of hydra-node.
    • Commits via /commit also allow to commit scripts into a Hydra Head. For that, the UTxO entry in the HTTP request needs to provide a witness with scrpit, datum, and redeemer to be used.
    • Removed the need to mark fuel when using external commits. Fees for Hydra protocol transactions are paid the largest UTxO held by the internal wallet if no marked fuel UTxO is present.
    • BREAKING The hydra-tui now uses the --cardano-signing-key to select and commit "external funds" to the Hydra Head. If you have used this in the past, make sure to not use the same key as also given to the hydra-node.
  • DEPRECATED the Commit command to commit funds held by the hydra-node internal wallet. Use the external commit feature instead.

  • Make hydra-node support time bounded transactions #196

    • The hydra-node tracks time as seen on-chain and uses that to validate any transactions, which can now use validity ranges the same way as on the layer 1.
    • Added current chain slot and time to log outputs.
  • BREAKING API output SnapshotConfirmed only includes transaction ids. #922

  • BREAKING Changed to the persisted state by removing the plutus scripts from the internal chain state and adding the headId.

    • Only the seedTxIn parameter is stored and the hydra-node will use the script compiled into it instead.
    • This substantially decreases the size of persisted and logged data.
  • BREAKING Changed the hydra-node command line options:

    • Removed --ledger-genesis argument and query this information from cardano-node now. #863
    • --version always displays git revision (SHA) alongside the declared version. #849
  • Fixed a bug where hydra-node resets head state when replaying close of another head. #927

  • Fixed a bug where hydra-node reports a wrong head status on Greetings after restart. #932

  • Decreased verbosity of logs #849

    • BeginEvent/EndEvent and BeginEffect/EndEffect log items are now paired using a numeric eventId and effectId.
    • Repurpose log-filter executable to compute duration of events and effects.

Full Changelog: https://github.com/input-output-hk/hydra/compare/0.10.0...0.11.0


New Contributors:

Other contributors to this release: @abailly-iohk @ch1bo @v0d1ch @ffakenz @pgrange

0.10.0

1 year ago

First release of hydra-node and hydra-plutus scripts which can be used on mainnet. Includes the technical changes required and must-have issues we want to see fixed before using a Hydra Head with real ADA, as well as documentation how to run hydra on mainnet.

:warning: IMPORTANT: There are several known issues, which are explained in the documentation.


Built artifacts

  • :package: Static x86_64-linux binaries: here (also attached)
  • :whale: Docker image: here

Hydra Scripts

Transaction IDs to be used as --hydra-scripts-tx-id when running hydra-node on the following networks:

  • preview: d237926e174a2ca386174a5810d30f0ca6db352219dd7eacdc7d5969ae75d58f checked in smoke test #111
  • preprod: 31b833c943fc267ee532c772be032183d5842b69492afaf5daa360171168c238 checked in smoke test #112
  • mainnet: af1a00e23a9b5c3a811d5c265dd25edfc81fd43f0fbf94229c4c0a5ab18aa5de checked in smoke test #113 :tada:

This release contains several breaking changes and you'll need to apply the following procedure to upgrade all the nodes running a head:

  1. Close the head
  2. Stop hydra-node
  3. Remove persistent files stored in --persistence-dir, in particular server-output and state
  4. Upgrade hydra-node version
  5. Start new hydra-node version

Only when this procedure has been applied to all Hydra nodes can you open a new head again.


  • Make hydra-node compatible to mainnet #713

    • BREAKING Change to command line options: Replaced --network-id with --mainnet or --testnet-magic.

    • Hard-coded temporary limit of 100 ADA for commits to a head on mainnet. This will be incraeased or be made configurable in future versions.

  • BREAKING Change in internal handling of rollbacks. Now, the hydra-node does only rollback it's low level state and not report when a rollback happened, under the optimistic assumption that the Hydra protocol transactions are still applicable and the Head is unaffected by the rollback. This was needed to avoid #784 and will be further improved in #185. This removes RolledBack server output from the API and also changes the log format of the internal Rollback event.

  • Reject commits of UTxO containing ReferenceScript to avoid a head not being finalizable by the hydra-node. The layer 1 scripts still accept these outputs, but we would not be able to automatically finalize a head which was opened from commits with reference scripts. Reference scripts on the layer 2 ledger (e.g. included in transactions via NewTx) are non-problematic. #766

  • All participants try to collect once seeing the last commitTx. #786 This may lead to misleading errors on the logs about not being able to post collect transactions (see also #839).

  • The hydra-node detects misconfiguration and mismatch of command line options with persisted state. #764

  • Fixed a bug where the hydra-node would crash sometimes when the cardano-node switches onto a fork, which is a common event on mainnet. [#560][560]

  • BREAKING Hydra scripts changed, need to use new --hydra-scripts-tx-id

    • Check contract continuity of state machine, i.e. that the output with the state datum and ST is actually owned by vHead. #777

    • Collect the right value in collect transactions (had been dropped for cost reasons, but found a constant cost way to do it).

    • The right headId is enforced in commit transactions.

    • Updated plutus-tx tool-chain. This also resulted in changed return type of validatorScript functions of script modules to SerialisedScript. #826

    • Use of a custom script context for vInitial and vCommit validators to reduce cost of transactions again. #825

    • The hydra scripts are persisted in hydra-plutus/scripts and golden tests ensure they are not changed accidentally. #772

  • BREAKING Changes to hydra-node API

    • Configurable API using query parameters. #380 Clients can decide to:

      • Skip observing history of events before they connected
      • View the transactions in the server output encoded as CBOR
      • Prevent utxo display in SnapshotConfirmed server outputs #808
    • Greetings message is now only sent last (after replaying history) on connection and added additional information #813:

      • headStatus - representing current hydra head status
      • snapshotUtxo - containing UTxOs and updating on each SnapshotConfirmed message
    • Updated hydra-tui to handle Greetings message accordingly. Make sure to use the same version.

    • Reference scripts in the hydra-node API (e.g. on NewTx) are not decodable when using SimpleScriptV2 envelope anymore (just use SimpleScript).

  • Versioned the documentation website, now the last released, stable is the default available at https://hydra.family/head-protocol, while the bleeding-edge from master branch is available at https://hydra.family/head-protocol/unstable. #803 #805 #783

  • Add the specification to the repository and website. #693

  • Disabled aarch64-darwin support, until a cardano-node for this platform is also available.

  • Use the server-provided timestamp of messages in the hydra-tui. #837

  • BREAKING Changes to hydra-cardano-api #826:

    • Removed HasPlutusScriptVersion and plutusScriptVersion with upstream version from cardano-api.
    • Renamed getScriptData to txOutScriptData to not conflict with the new function in cardano-api.
    • Changed toScriptData, toLedgerData, fromLedgerData, txOutScriptData and lookupScriptData to return or require a HashableScriptData instead.
    • Added fromScriptData generic conversion function.
    • Changed signature of totalExecutionCost to be more clearly Babbage era specific.
    • Changed fromPlutusScript to take new SerialisedScript type (it's just an alias now).
    • Added genTxIn and arbitrary instance for TxIn.
    • Added getChainPoint.

Full Changelog: https://github.com/input-output-hk/hydra/compare/0.9.0...0.10.0

New Contributors:

Contributors to this release: @ch1bo @pgrange @v0d1ch @ffakenz @matiwinnetou @abailly-iohk

0.9.0

1 year ago

:dragon_face: We renamed the repository from hydra-poc to hydra!

This release features a hydra-node with fully specified behavior of on-chain hydra-plutus scripts and off-chain head-logic, decreased costs for opening/closing a Head and scalable contestation deadline semantics.


:warning: Delete your persistence directory!

This release contains several breaking changes and you'll need to apply the following procedure to upgrade all the nodes running a head:

  1. Close the head
  2. Stop hydra-node
  3. Remove persistent files stored in --persistence-dir, in particular server-output and state
  4. Upgrade hydra-node version
  5. Start new hydra-node version

Only when this procedure has been applied to all Hydra nodes can you open a new head again.


Changes to hydra-node

  • BREAKING Changes in the persistence format #725, #745.

  • BREAKING Changes to the API:

    • Removed TxSeen and TxExpired server outputs. Use the TxValid and TxInvalid responses instead.
    • All participants now see TxValid for all valid transactions (it replaces TxSeen).
    • Renamed ReadyToCommit -> HeadIsInitializing
    • Added a headId to most server outputs. #678
    • Added a timestamp and a monotonic sequence number. #618
  • BREAKING Addressed short-comings in hydra-plutus scripts #452 and improved their performance / reduced cost #652, #701, #709. Roughly the cost of transactions according to our benchmarks changed:

    • Init increased by 10%.
    • Commit reduced by 50%.
    • Collect reduced by 30%.
    • Close reduced by 0.2-0.3₳
    • Contest reduced by 0.1-0.2₳.
    • Abort reduced by 0.1-0.3₳.
    • Fanout reduced by 0.2-0.3₳.
  • BREAKING Change the way contestation period and deadline are handled:

    • There is a new hydra-node flag --contestation-period expressed in seconds to control the close tx validity bounds as well as determine the contestation deadline. For example, with --contestation-period 60s, the node will close the head 60s after submitting the close transaction and other parties will have another 60s to contest. This means the deadline may be up 2 * --contestation-period after a close transaction. #615 and ADR21
    • If hydra-node receives a init transaction with not matching --contestation-period then this tx is ignored which implies that all parties need to agree on the same value for contestation period.
    • Removed contestationPeriod from the Init API request payload.
    • The deadline get's pushed by --contestation-period on each contest transaction. #716
  • Change the way the internal wallet initializes its state. #621

    • The internal wallet does now always query ledger state and parameters at the tip. This should fix the AcquireFailure issues.
  • Added NoFuelUTXOFound error next to the already existing NotEnoughFuel. Previously the node would fail with NotEnoughFuel when utxo was not found. Now NotEnoughFuel is used when there is not enough fuel and NoFuelUTXOFound when utxo was not to be found.

  • Added support have hydra-node to start following the chain from genesis by setting --start-chain-from 0.

  • Added script sizes to hydra-node --script-info and published transaction cost benchmarks.

  • Changes to the logs:

    • HeadLogic Outcome is now being logged on every protocol step transition.
    • Added intermediate LastSeenSnapshot and extended RequestedSnapshot seen snapshot states.
    • Changed wallet-related logs of BeginInitialize, EndInitialize and added SkipUpdate.

Changes to hydra-cardano-api

  • BREAKING Remove Hydra.Cardano.Api.SlotNo module.
  • BREAKING Replace fromConsensusPointHF with fromConsensusPointInMode and toConsensusPointHF with toConsensusPointInMode.
  • Re-export new AcquiringFailure type from cardano-api.
  • Add fromPlutusCurrencySymbol conversion function.
  • Introduce new Hydra.Cardano.Api.Pretty module and move functions renderTx, renderTxWithUTxO and renderTxs from hydra-node package to this new module.

Other changes

  • hydra-cluster executable can be used to provide a local cardano "network" with --devnet argument

  • Switched to using nix flakes and CHaP

    • Makes configuration of binary-caches easier to discover (you get asked about adding them).
    • Will make bumping dependencies (e.g. cardano-node) easier.
    • Build commands for binaries and docker images change, see updated Contribution Guidelines

Full Changelog: https://github.com/input-output-hk/hydra/compare/0.8.1...0.9.0

Contributors of this release: @v0d1ch @pgrange @ffakenz @perturbing @andreabedini @abailly-iohk @ch1bo

New Contributors:


Built artifacts

  • :package: Static x86_64-linux binaries: here (also attached)
  • :whale: Docker image: here

Hydra Scripts

Transaction IDs to be used as --hydra-scripts-tx-id when running hydra-node on the following networks:

  • preview: 74b587d08d12aa679bdfeb3eaa57d698e426045dd529d4130d7d8ca0c18d54b0 checked & published in #43
  • preprod: 6fd13073c47411af7f3adf31f46e61f570872a832822fdc5da5b214766651bfd checked & published in #44

0.8.1

1 year ago
  • BREAKING Implemented ADR18 to keep only a single state:

    • The hydra-node now only uses a single state file in --persistence-dir to keep it's state.
    • The chainState does not include read-only chain context information anymore (is smaller now).
    • Include the chainState in InvalidStateToPost errors.
    • Moved received transaction ids into RolledForward log message.
    • Reduce log size by removing ChainContext. #598
  • BREAKING Changed internal wallet logs to help with debugging #600

    • Split ApplyBlock into BeginUpdate and EndUpdate
    • Split InitializedWallet into BeginInitialize and EndInitialize
  • After restarting hydra-node, clients will receive the whole history. #580

    • This history will be stored in the server-output file in --persistence-dir.
    • Clients should use Greetings to identify the end of a restart/replay of events.
  • Fixed observing the chain for Hydra L1 transactions after restart. 599

  • hydra-cardano-api now published on Cardano Haskell Packages (CHaP). #504


Built artifacts

  • :package: Static x86_64-linux binaries: here (also attached)
  • :whale: Docker image: here

Hydra Scripts

Transaction IDs to be used as --hydra-scripts-tx-id when running hydra-node on the following networks:

  • preview: 4081fab39728fa3c05c0edc4dc7c0e8c45129ca6b2b70bf8600c1203a79d2c6d

0.8.0

1 year ago
  • BREAKING Hydra keys now use the text envelope format.

    • hydra-tools executable now produces keys in the same format as cardano keys so this should make key handling simpler.
    • Take a look at the example on how to use hydra-tools to generate necessary hydra keys.
  • BREAKING hydra-node command line flag --node-id is now mandatory.

    • Instead of Host we are using the node-id in the server messages like + PeerConnected/Disconnected which are also used in
    • the TUI to distinguish between different connected peers.
    • This also changes the way how NodeIds are represented on the API.
  • BREAKING Keep track of contestationDeadline instead of remainingContestationPeriod and fix ReadyToFanout. #483

    • Clients can now rely on ReadyToFanout, such that sending a Fanout input after seeing this output will never be "too early".
    • The HeadIsClosed server output now contains the deadline instead of the remaining time.
    • See hydra-tui for an example how to use the contestationDeadline and ReadyToFanout.
    • See ADR20 for details and the rationale.
  • BREAKING Several changes to the API:

    • The InitialSnapshot only contains the initialUTxO as the rest of the information was useless. #533
    • Renamed CannotSpendInput -> InternalWalletError and CannotCoverFees -> NotEnoughFuel. #582
  • BREAKING Changed logs to improve legibility and trace on-chain posting errors. #472

    • Strip chain layer logs to only contain TxId instead of full transactions in the nominal cases.
    • Renamed log entry prefixes Processing -> Begin and Processed -> End.
    • Added PostingFailed log entry.
  • BREAKING The hydra-cluster executable (our smoke test) does require --publish-scripts or --hydra-scripts-tx-id now as it may be provided with pre-published hydra scripts.

  • The hydra-node does persist L1 and L2 states on disk now: #187

    • New --persistence-dir command line argument to configure location.
    • Writes two JSON files headstate and chainstate to the persistence directory.
    • While introspectable, modification of these files is not recommended.
  • Fixed bugs in hydra-node:

    • Crash after 3k blocks because of a failed time conversion. #523
    • Internal wallet was losing memory of spent fuel UTxOs in presence of transaction failures. #525
    • Node does not see some UTxOs sent to the internal wallet on startup. #526
    • Prevent transactions from being resubmitted for application over and over. #485
  • Prevent misconfiguration of hydra-node by logging the command line options used and error out when:

    • provided number of Hydra parties exceeds a known working maximum (currently 4)
    • number of provided Cardano and Hydra keys is not the same
  • Added a hydra-tools executable, to help with generating Hydra keys and get hold of the marker datum hash. #474

  • Compute transaction costs as a "min fee" and report it in the tx-cost benchmark.

  • Update hydra-node-options section in docs.

  • Publish test results on website. #547

  • Improved hydra-tui user experience:

    • Fixed too fast clearing of errors and other feedback #506
    • Introduced a pending state to avoid resubmission of transactions #526
    • Can show full history (scrollable) #577
  • Build & publish static Linux x86_64 executables on each release :point_down: #546


Built artifacts

  • :package: Static x86_64-linux binaries: here (also attached)
  • :whale: Docker image: here

Hydra Scripts

Transaction IDs to be used as --hydra-scripts-tx-id when running hydra-node on the following networks:

  • preview: 4081fab39728fa3c05c0edc4dc7c0e8c45129ca6b2b70bf8600c1203a79d2c6d published & checked during smoke test run #32 (failing because no PlutusV2 cost model was on the testnet at that time)