All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
As a minor extension, we also keep a semantic version for the UNRELEASED
changes.
-
IMPORTANT - Do not release this version
- Incremental commits - off-chain changes to make the incremental commits possible.
Important to note is that on-chain security is not implemented and hydra-node in this
state is not releasable!
Missing off-chain items to implement as a series of next PR's:
- Revisit types related to observations/posting transactions and make sure the fields are named appropriatelly
- Incremental commits - off-chain changes to make the incremental commits possible.
Important to note is that on-chain security is not implemented and hydra-node in this
state is not releasable!
Missing off-chain items to implement as a series of next PR's:
-
Tested with
cardano-node 9.2.0
andcardano-cli 9.4.1.0
. -
BREAKING Rewrite of the commit script in aiken:
- This makes
abort
andcollectCom
transactions more efficient and results in a new maximum number of head participants being8
. - Changes script hashes in
hydra-plutus
- This makes
-
BREAKING Rewrite of the initial script in aiken and update to Plutus V3:
- This makes the initial script smaller by 1337 bytes
- Changes script hashes in
hydra-plutus
-
Fix the bug where commit endpoint drops withdraw redeemers #1643
-
BREAKING Change to
SnapshotConfirmed
andTxValid
server outputs, as well as to persistedStateEvent
format:- Snapshots now contain the full transactions in
confirmed
and field names changed. - Persisted
StateChanged
events containing a snapshot changed consequently and are not backward compatible. TxValid
only refers to the transaction by id.- Overall this results in transactions still to be submitted once per client, but requires signifanctly less book-keeping on the client-side.
- Snapshots now contain the full transactions in
-
Add blockfrost support to
hydra-chain-observer
, to follow the chain via Blockfrost API. -
Fix
bench-e2e single
benchmarks and only use--output-directory
to keep the whole benchmark state. -
Add
inlineDatumRaw
to transaction outputs on thehydra-node
API. -
Update mithril to
2442.0
-
Tested with
cardano-node 9.1.1
andcardano-cli 9.2.1.0
-
Switch L2 ledger to use the
Conway
era. #1178- Conway formatted transactions can be submitted to the
hydra-node
, while past eras are still supported (except deprecated features like protocol updates). - This includes support for
PlutusV3
scripts, but most of the governance-related features have no meaning in the Hydra L2.
- Conway formatted transactions can be submitted to the
-
Added head id information into the Greetings message.
-
Adds a manual recipient address entry to
hydra-tui
and fixes event handling. #1607 -
Add a demo mode to hydra-cluster to facilitate network resiliance tests #1552
-
New landing page and updated documentation style. #1560
-
Fixed pruning of transactions when a snapshot is requested:
- Before, the
hydra-node
would re-apply transactions in the wrong order which made already "seen" transactions (indicated byTxValid
) disappear from the local ledger state and also not get snapshotted. - Details in #1559
- Before, the
-
Add TLS support for the API server via
--tls-cert
and--tls-key
command line options. #1555
-
Tested with
cardano-node 9.1.0
andcardano-cli 9.2.1.0
. -
Fixed fee calculation of the internal wallet when the network switches to
Conway
. This allows heads to be opened inBabbage
and closed/finalized inConway
. #1553 -
BREAKING Changes to the
hydra-node
API/commit
endpoint #1463:- Removed the check that prevented committing UTxOs from an internal
hydra-node
wallet. SpendingNodeUtxoForbidden
error was removed.
- Removed the check that prevented committing UTxOs from an internal
-
BREAKING Add capability to move UTxO out of an open Head to the Cardano main chain: #1344
- Submitting a decommit transaction to
POST /decommit
or asDecommit
command through websocket, requests removal of this transactions' outputs from the head. - When successful,
DecommitApproved
andDecommitFinalized
indicate that all outputs are made available on the layer one. - Invalid transactions are explained through a
DecommitInvalid
server output.
- Submitting a decommit transaction to
-
Change
--start-chain-from
to always use the newer point when also a head state is known. #1471 -
Moved several pages from "core concepts" into the user manual and developer docs to futher improve user journey. #1486
-
Offline mode of
hydra-node
uses--node-id
to derive an artificial offlineheadId
. #1551
-
BREAKING Change
hydra-node
API/commit
endpoint for committing from scripts #1380:- Instead of the custom
witness
extension ofUTxO
, the endpoint now accepts a blueprint transaction together with theUTxO
which is spent in this transaction. - Usage is still the same for commiting "normal"
UTxO
owned by public key addresses. - Spending from a script
UTxO
now needs theblueprintTx
request type, which also unlocks more involved use-cases, where the commit transaction should also satisfy script spending constraints (like additional signers, validity ranges etc.)
- Instead of the custom
-
DEPRECATED the
GetUTxO
client input andGetUTxOResponse
server output. UseGET /snapshot/utxo
instead. -
Update navigation and re-organized documentation website https://hydra.family #1440
- Updated logos
- Removed localization as it got outdated and on-demand site translation tools exist.
-
Add
GET /snapshot/utxo
API endpoint to query confirmed UTxO set on demand. #1398- Always responds with the last confirmed UTxO
-
Set CORS headers on
hydra-node
API to allow requests from any origin*
. #1434 -
hydra-node
logs will now reportNetworkEvents
to distinguish betweenConnectivityEvent
s andReceivedMessage
s on the network. #1396 -
Hydra now uses a versioned protocol for handshaking. In the event of a node attempting to connect using a different version of the networking protocol, a
HandshakeFailure
event will be recorded in the logs and sent as a server output on the API. #1381 -
Make
hydra-cluster --devnet
more configurable- Now it is idle by default again and a
--busy
will make it busy respending the same UTxO. #1420
- Now it is idle by default again and a
-
Tested with
cardano-node 8.9.0
,cardano-cli 8.20.3.0
andmithril 2412.0
. -
BREAKING Change to the
hydra-node
logs, monitoring and removal oflog-filter
executable:- Renamed the
Event
data types toInput
and consequently log items likeBeginEvent
toBeginInput
. - 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
.
- Renamed the
-
BREAKING Hydra scripts changed due to updates in the
plutus
toolchain:- Overall slight increase in script size.
- 50% less memory usage in
close
andcontest
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.
-
Introduce
EventSource
andEventSink
interfaces inhydra-node
:- These handles can now be used as "extension points" to make the
hydra-node
store and load its state differently or exposeStateEvent
s 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
- These handles can now be used as "extension points" to make the
-
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 theHeadIsContested
output on thehydra-node
API. -
Add
--sanchonet
option tohydra-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 inhydra-node
andhydra-chain-observer
. This also includes tests that verifyhydra-node
working on Conway networks likesanchonet
and thehydra-explorer
observing heads onsanchonet
. -
Fix a bug in the contest observation where contesters were extracted from the input instead of the output datum. #1266
-
Tested with
cardano-node 8.7.3
andcardano-cli 8.17.0.0
. -
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-calledspendableUTxO
. This raises aPersistenceException
if an incompatiblestate
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 forhydra-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.
- Initializes a head with given
-
Prepare
hydra-node
for the upcomingConway
hard-fork #1177:- Interactions with
cardano-node
are updated to work in both,Babbage
andConway
era. - Unsupported eras are reported as error when starting.
- Interactions with
-
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 bycardano-cli query protocol-parameters
, expected athydra-node --ledger-protocol-parameters
and produced by the API endpoint. -
The
hydra-cluster
binary can bootstrapcardano-node
s running on public networks usingmithril-client
. -
BREAKING Internal changes to
hydra-cardano-api
:- Renamed
HasMultiAsset
type class toIsMaryEraOnwards
. UsemaryEraOnwards
to produce witnesses for features from mary onwards. - Renamed
HasScriptData
type class toIsAlonzoEraOnwards
. UsealonzoEraOnwards
to produce witnesses for features from alonzo onwards. - Renamed
HasInlineDatums
type class toIsBabbageEraOnwards
. UsebabbageEraOnwards
to produce witnesses for features from babbage onwards.
- Renamed
-
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 thishydra-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 anotherhydra-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
-
BREAKING Update to plutus 1.9. This changes the script hashes.
-
Query at the tip for local cardano-node queries. We witnessed these queries failing in case of a rollback and always querying at the tip seems to fix this.
-
BREAKING Changes to
hydra-plutus
scripts. -
Add option to draft a commit tx using inline datums.
-
Remove hydra-tools package. Move functionality to generate hydra keys to the hydra-node executable.
-
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.
-
BREAKING Support new cardano-node version 8.1.2
-
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
fieldwitnesses
) 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: Usecbor=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 thehydra-node
internal wallet. Use the external commit feature instead. Also rename theErrNoFuelUTxOFound
toErrNoUTxOFound
. -
BREAKING Changes to Hydra scripts due to upgrading our plutus version and toolchain to GHC 9.2.8.
-
BREAKING Change persisted state to be a sequence of events instead. 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.
-
Enhanced
hydra-node
api.-
New HTTP endpoint (
POST /cardano-transaction
) to submit a transaction on L1. -
Greetings
message now contains also the hydra-node version. -
New HTTP endpoint (
GET /protocol-parameters
) which provides the current protocol parameters.
-
-
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. -
BREAKING Changes to
hydra-cardano-api
:- Drop
UsingRawBytesHex
as it is available upstream incardano-api
now. - Remove
totalExecutionCost
ascardano-ledger
providesgetMinFeeTx
now. - Add
BundledProtocolParameters
pattern for latestEra
toHydra.Cardano.Api
. - Add
ledgerEraVersion
for the latestEra
en-/decoder version. - Change
minUTxOValue
to takeBundledProtocolParameters
. - Add
fromLedgerMultiAsset
helper as transactions onlymint
MultiAsset
.
- Drop
-
Created
hydra-plutus-extras
package to re-use some utilities better between packages.
-
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.
- This changes
-
Suport commits from external wallets #215
- Added the
/commit
HTTP endpoint to thehydra-node
for creating a draftcommit
transaction to commit requested UTxO into a head. This transaction can be signed and submitted to the network by the hydra client now instead ofhydra-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 awitness
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 thehydra-node
.
- Added the
-
DEPRECATED the
Commit
command to commit funds held by thehydra-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.
- The
-
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 thehydra-node
will use the script compiled into it instead. - This substantially decreases the size of persisted and logged data.
- Only the
-
BREAKING Changed the
hydra-node
command line options: -
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 onGreetings
after restart. #932 -
Decreased verbosity of logs #849
BeginEvent
/EndEvent
andBeginEffect
/EndEffect
log items are now paired using a numericeventId
andeffectId
.- Repurpose
log-filter
executable to compute duration of events and effects.
-
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 removesRolledBack
server output from the API and also changes the log format of the internalRollback
event. -
Reject commits of
UTxO
containingReferenceScript
to avoid a head not being finalizable by thehydra-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 viaNewTx
) 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 thecardano-node
switches onto a fork, which is a common event on mainnet. #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 incommit
transactions. -
Updated
plutus-tx
tool-chain. This also resulted in changed return type ofvalidatorScript
functions of script modules toSerialisedScript
. #826 -
Use of a custom script context for
vInitial
andvCommit
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 statussnapshotUtxo
- containing UTxOs and updating on eachSnapshotConfirmed
message
-
Updated
hydra-tui
to handleGreetings
message accordingly. Make sure to use the same version. -
Reference scripts in the
hydra-node
API (e.g. onNewTx
) are not decodable when usingSimpleScriptV2
envelope anymore (just useSimpleScript
).
-
-
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 acardano-node
for this platform is also available. -
Use the server-provided
timestamp
of messages in thehydra-tui
. #837 -
BREAKING Changes to
hydra-cardano-api
#826:- Removed
HasPlutusScriptVersion
andplutusScriptVersion
with upstream version fromcardano-api
. - Renamed
getScriptData
totxOutScriptData
to not conflict with the new function incardano-api
. - Changed
toScriptData
,toLedgerData
,fromLedgerData
,txOutScriptData
andlookupScriptData
to return or require aHashableScriptData
instead. - Added
fromScriptData
generic conversion function. - Changed signature of
totalExecutionCost
to be more clearlyBabbage
era specific. - Changed
fromPlutusScript
to take newSerialisedScript
type (it's just an alias now). - Added
genTxIn
andarbitrary
instance forTxIn
. - Added
getChainPoint
.
- Removed
🐲 Renamed the repository from hydra-poc
to hydra
!
-
BREAKING Changes to the API:
- Removed
TxSeen
andTxExpired
server outputs. Use theTxValid
andTxInvalid
responses instead. - All participants now see
TxValid
for all valid transactions (it replacesTxSeen
). - Renamed
ReadyToCommit -> HeadIsInitializing
- Added a
headId
to most server outputs. #678 - Added a
timestamp
and a monotonicseq
uence number. #618
- Removed
-
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 up2 * --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 theInit
API request payload. - The deadline get's pushed by
--contestation-period
on each contest transaction. #716
- There is a new hydra-node flag
-
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.
- The internal wallet does now always query ledger state and parameters at the
tip. This should fix the
-
Added
NoFuelUTXOFound
error next to the already existingNotEnoughFuel
. Previously the node would fail withNotEnoughFuel
when utxo was not found. NowNotEnoughFuel
is used when there is not enough fuel andNoFuelUTXOFound
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 extendedRequestedSnapshot
seen snapshot states. - Changed wallet-related logs of
BeginInitialize
,EndInitialize
and addedSkipUpdate
.
- HeadLogic
- BREAKING Remove
Hydra.Cardano.Api.SlotNo
module. - BREAKING Replace
fromConsensusPointHF
withfromConsensusPointInMode
andtoConsensusPointHF
withtoConsensusPointInMode
. - Re-export new
AcquiringFailure
type fromcardano-api
. - Add
fromPlutusCurrencySymbol
conversion function. - Introduce new
Hydra.Cardano.Api.Pretty
module and move functionsrenderTx
,renderTxWithUTxO
andrenderTxs
fromhydra-node
package to this new module.
-
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
-
BREAKING Implemented ADR18 to keep only a single state:
- The
hydra-node
now only uses a singlestate
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
inInvalidStateToPost
errors. - Moved received transaction ids into
RolledForward
log message. - Reduce log size by removing ChainContext. #598
- The
-
BREAKING Changed internal wallet logs to help with debugging #600
- Split
ApplyBlock
intoBeginUpdate
andEndUpdate
- Split
InitializedWallet
intoBeginInitialize
andEndInitialize
- Split
-
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.
- This history will be stored in the
-
Fixed observing the chain for Hydra L1 transactions after restart. 599
-
hydra-cardano-api
now published on Cardano Haskell Packages (CHaP). #504
-
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 thenode-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
NodeId
s are represented on the API.
- Instead of
-
BREAKING Keep track of
contestationDeadline
instead ofremainingContestationPeriod
and fixReadyToFanout
. #483- Clients can now rely on
ReadyToFanout
, such that sending aFanout
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 thecontestationDeadline
andReadyToFanout
. - See ADR20 for details and the rationale.
- Clients can now rely on
-
BREAKING Several changes to the API:
-
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
andProcessed -> End
. - Added
PostingFailed
log entry.
- Strip chain layer logs to only contain
-
BREAKING The
hydra-cluster
executable (our smoke test) does require--publish-hydra-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
andchainstate
to the persistence directory. - While introspectable, modification of these files is not recommended.
- New
-
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
- Crash after
-
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.
-
Improved
hydra-tui
user experience: -
Build & publish static Linux x86_64 executables on each release 👇 #546
-
BREAKING Switch to
BabbageEra
andPlutusV2
.hydra-cardano-api
now usesEra = BabbageEra
and constructsPlutusV2
scripts.hydra-plutus
scripts now use theserialiseData
builtin to CBOR encode data on-chain.hydra-node
now expectsBabbageEra
blocks and producesBabbageEra
transactions.hydra-cluster
now spins up a stake pool instead of a BFT node (not possible inPraos
anymore).- As a consequence, the Hydra scripts in
hydra-plutus
have now different script hashes.
-
BREAKING Use reference inputs and reference scripts in
abort
transaction.- Need to provide a
--hydra-scripts-tx-id
to thehydra-node
containing the current (--script-info
) Hydra scripts. - Added the
publish-scripts
sub-command tohydra-node
to publish the current Hydra scripts.
- Need to provide a
-
Added a
hydra-cluster
executable, which runs a single scenario against a known network (smoke test) #430 #423. -
Use deadline when posting a
fanoutTx
instead of the current slot #441. -
The user manual is now also available in Japanese thanks to @btbf! 🇯🇵
-
Fixed display of remaining contestation period in
hydra-tui
#437.
-
Implement on-chain contestation logic #192:
- Node will automatically post a
Contest
transaction when it observes aClose
orContest
with an obsolete snapshot - Posting a fan-out transaction is not possible before the contestation dealine has passed
- Node will automatically post a
-
Transactions can now be submitted as raw CBOR-serialized object, base16 encoded, using the
NewTx
client input. This also supports the text-envelope format from cardano-cli out of the box. See the api Reference. -
BREAKING The
hydra-node
does not finalize Heads automatically anymore.- Instead clients do get a new
ReadyToFanout
server output after the contestation period and - Clients can use the
Fanout
client input command to deliberately finalize a Head when it is closed and the contestation period passed.
- Instead clients do get a new
-
Remaining contestation period is included in
HeadIsClosed
and displayed inhydra-tui
.
- BREAKING: The starting state of a Head is renamed to
IdleState
, which is visible in the log API.
- Head script to check UTxO hash upon closing the head correctly #338. Previously it was possible to close the head with arbitrary UTxO.
- Clients can fanout a Head closed without any off-chain transactions (eg. with initial snapshot) #395
-
Start
hydra-node
tracking the chain starting at a previous point using new--start-chain-from
command line option #300.- This is handy to re-initialize a stopped (or crashed)
hydra-node
with an already inititalized Head - Note that off-chain state is NOT persisted, but this feature is good enough to continue opening or closing/finalizing a Head
- This is handy to re-initialize a stopped (or crashed)
-
Handle rollbacks #184
- Not crash anymore on rollbacks
- Rewind the internal head state to the point prior to rollback point
- Added
RolledBack
server output, see API reference - See the user manual for a detailed explanation on how rollbacks are handled.
-
Hydra Network section on the website about networking requirements and considerations
-
Benchmarks section on the website with continuously updated and published results on transaction costs of Hydra protocol transactions
- These are also performed and reported now on every PR -> Example
-
New architectural decision records:
-
Improved
hydra-node --version
to show an easier to understand and accurate revision based ongit describe
-
Added
hydra-node --script-info
to check hashes of plutus scripts available in ahydra-node
.- This can also be seen as the "script version" and should stabilize as we progress in maturity of the codebase.
-
BREAKING Switch to Ed25519 keys and proper EdDSA signatures for the Hydra Head protocol
- The
--hydra-signing-key
and consequently--hydra-verification-key
are now longer and not compatible with previous versions!
- The
-
BREAKING The Hydra plutus scripts have changed in course of finalizing #181
- All Hydra protocol transactions need to be signed by a Head participant now
- This changes the script address(es) and the current
hydra-node
would not detect old Heads on the testnet.
-
BREAKING Renamed server output
UTxO -> GetUTxOResponse
- This should be a better name for the response of
GetUTxO
client input on our API :)
- This should be a better name for the response of
-
Updated our dependencies (
plutus
,cardano-ledger
, etc.) to most recent released versions making scripts smaller and Head transactions slighly cheaper already, see benchmarks for current limits.
-
Reject commit transactions locking a UTxO locked by Byron addresses, part of #182
- This would render a Head unclosable because Byron addresses are filtered out by the ledger and not visible to plutus scripts
-
Fix instructions in demo setup without docker to use
0.0.0.0
and correct paths.
- TUI quickly flashes an error on fanout. This is because all nodes try to post a fanout transaction, but only one of the participants' transactions wins. Related to #279
- Recipient addresses to send money to in the TUI are inferred from the current UTXO set. If a party does not commit a UTXO or consumes all its UTXO in a Head, it won't be able to send or receive anything anymore.
- TUI crashes when user tries to post a new transaction without any UTXO remaining.
- The internal wallet of hydra-node requires a UTXO to be marked as "fuel" to drive the Hydra protocol transactions. See user manual.
- Our user manual 📖 is now available! It includes installation and usage instructions, a full API reference and also a knowledge base about Hydra concepts. The manual will be an ever-evolving source of documentation that we'll maintain alongside the project.
- Support multiple Heads per Cardano network by identifying and distinguishing transactions of individual Head instances #180.
- Mint and burn state token used to thread state across the OCV state machine, and participation tokens for each party in the head #181
- Provide (mandatory) command-line options
--ledger-genesis
and--ledger-protocol-parameters
to configure the ledger that runs inside a head. Options are provided as filepath to JSON files which match formats fromcardano-cli
andcardano-node
#180. - Created hydra-cardano-api as wrapper around cardano-api specialized to the latest Cardano's era, and with useful extra utility functions.
- Two new architectural decision records:
--network-magic
option for thehydra-node
andhydra-tui
has been changed to--network-id
. Also, thehydra-tui
command-line used to default to mainnet when not provided with any--network-magic
option, it doesn't anymore,--network-id
is mandatory. #180- Optimize the
CollectCom
transition of the on-chain Hydra contract to allow collecting commits from more than 2 parties! #254 - Use a faucet to distribute funds in test suites and the
demo/
setup. - Internally, better decouple the management of the on-chain head state from the network component. While not visible to the end user, this improvement paves the way for better handling rollbacks and on-chain "instability" of newly posted transactions. #184
- Internally, improved and consolidate generators used for property-based testing to cover a wider range of cases, be more consistent and also faster (avoiding to generate too large nested data-structures).
Hydra.Network.Ouroboros
not using hard-coded valency values anymore to allow more than 7 peer connections #203.- Build issues due to explicit packages list in nix shell #223.
hydra-tui
to show form focus, indicate invalid fields in dialogs and only allow valid values to be submitted #224.- Repaired benchmarks and improved collected metrics; in particular, benchmarks now collect CPU usage and provide average confirmation times over 5s windows.
- Fixed a bug in the Fanout transaction scheduling and submission where clients would attempt to post a fanout transaction before a 'Close' transaction is even observed. Now, every participant of the head will attempt to post a fanout a transaction after they successfully observed a transaction. Of course, the layer 1 will enforce that only one fanout is posted #279.
- Only no or one utxo can be committed to a Head.
- Recipient addresses to send money to in the TUI are inferred from the current UTXO set. If a party does not commit a UTXO or consumes all its UTXO in a Head, it won't be able to send or receive anything anymore.
- TUI crashes when user tries to post a new transaction without any UTXO remaining.
- The internal wallet of hydra-node requires a UTXO to be marked as "fuel" to drive the Hydra protocol transactions. See user manual.
- Aborting a head with more than 2 participants (i.e.
> 2
) requires increase in tx size limit over current mainchain parameters to ~20KB. - Head can collect at most 3 commits and each party can commit either 1 or 0 UTXO to a Head.
- The head cannot be finalized if holding more than ~100 assets (or ~50 ada-only UTxO entries) with the standard tx size of 16KB.
- Implementation of on-chain verification of Hydra Head lifecycle without contests. This first version with its various shortcuts is documented on examples of the full and abort on-chain life-cycles of a Hydra Head
- Enable nix-shell on Mac
- Build separate docker images for
hydra-node
andhydra-tui
available as packages from GitHub repo - Utility executable
inspect-script
to dump contracts for further analysis - CBOR encoder and Merkle-Tree in Plutus as separate packages
plutus-cbor
andplutus-merkle-tree
, released & tagged separately
- Package
local-cluster
is nowhydra-cluster
. - Use
cardano-api
types and functions to interact with chain. - Refine computation of fees from internal wallet.
- Remove several sources of
error
in chain interaction component.
collectComTx
requires increase in tx size limit over current mainchain parameters to 32KB, which should be alleviated with Plutus optimisations and merging all contracts in one in future releases- Head can collect at most 9 commits and each party can commit either 1 or 0 UTXO to a Head
fanoutTx
cannot handle more than 100 UTxO with the standard tx size of 16KB (200 with the temporary increase for test purpose).- Known issues from
0.2.0
still apply
- Direct chain integration which allows to connect to a real cardano-node / devnet; no on-chain validators though.
- Support alonzo transactions inside the Hydra Head. For now using a
freeCostModel
. - Command line options
--node-socket
,--network-magic
and--cardano-{signing,verification}-key
tohydra-node
andhydra-tui
to configure the Cardano network access.
- Command line options of
hydra-node
quite significantly to distinguish hydra credentials from cardano credentials. - Commit and transaction creation logic of TUI to use cardano credentials.
- ZeroMQ mock-chain executable, chain component and corresponding
hydra-node
command line options. - ZeroMQ based network component.
- Aliases from party identifiers.
hydra-tui
to correctly show current state when re-connecting.
- There can only be one Head per Cardano network (i.e. on the devnet).
- Only no or one utxo can be committed to a Head.
- Recipient addresses to send money to in the TUI are inferred from the current UTXO set. If a party does not commit a UTXO or consumes all its UTXO in a Head, it won't be able to send or receive anything anymore.
- TUI crashes when user tries to post a new transaction wihout any UTXO remaining.
- Not an issue, but a workaround: The internal wallet of
hydra-node
requires a UTXO to be marked as "fuel" to drive the Hydra protocol transactions.
- First proof-of-concept for a
hydra-node
- Coordinated Hydra Head protocol
- Single Head per hydra-node
- Stubbed chain using external process
- Network statically configured, direct TCP connections
- WebSocket, message-based API Server
- Terminal user interface client