Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use any in cddl specs / tests. #4638

Merged
merged 5 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions docs/network-spec/miniprotocols.tex
Original file line number Diff line number Diff line change
Expand Up @@ -233,18 +233,21 @@ \section{CBOR and CDDL}

Note that the networking layer knows very little about blocks, transactions or
their indetifiers. We use parametric polymorphism in the implementation which
is not present in CDDL. For this reason we have to make concrete choices which
might not agree with what is used by `Cardano`. Each ledger era has its own
CDDL spec which you can find
is not present in CDDL. For this reason we use \texttt{any} in our CDDL specifications.
If you want to find concrete instatiations of these types in by `Cardano` you
will need to consult
\href{https://github.com/input-output-hk/cardano-ledger}{cardano-ledger} and
\href{https://github.com/input-output-hk/ouroboros-consensus}{ouroboros-consensus}.
Each ledger era has its own CDDL spec which you can find
\href{https://github.com/input-output-hk/cardano-ledger#cardano-ledger}{here}.
Note that there's also the hard fork combinator (HFC) which allows us to
combine multiple eras into a single blockchain. It affects how things are
encoded across different eras. Currently this is not properly documented (see
combine multiple eras into a single blockchain. It affects how many of the
data types are encoded across different eras. Currently this is not properly
documented (see
\href{https://github.com/input-output-hk/ouroboros-consensus/issues/7}{issue
\#7}). In the mean time we can only offer informal advise: things are encoded as
tuples (length 2 lists), where the first element is a zero based index of an
era while the second item represents the data from that era (e.g. block,
transaction, etc).
\#7}). In the mean time we can only offer informal advise: data is encoded
as tuples (length 2 lists), where the first element is a zero based index of an
era while the second item is the era dependent encoding.

\section{Dummy Protocols}
Dummy protocols are only used for testing and are not needed either for
Expand Down
2 changes: 2 additions & 0 deletions ouroboros-network-protocols/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### Non-breaking changes

* Improved cdd specs by using `any` (PR #4638)

## 0.5.2.0 -- 2023-09-08

### Breaking changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ codecChainSync encodeHeader decodeHeader
return (SomeMessage MsgDone)

--
-- failures per protcol state
-- failures per protocol state
--

(_, _, ClientAgency TokIdle) ->
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading