Skip to content

Commit

Permalink
Updated nix & network-spec
Browse files Browse the repository at this point in the history
  • Loading branch information
coot authored and jasagredo committed Dec 2, 2022
1 parent 91a8435 commit f5368db
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
14 changes: 7 additions & 7 deletions docs/network-spec/miniprotocols.tex
Expand Up @@ -547,9 +547,9 @@ \subsection{CDDL encoding specification}\label{handshake-cddl}
client protocol.

\subsubsection{Node to node handshake mini-protocol}
\lstinputlisting[style=cddl]{../../ouroboros-network/test-cddl/specs/handshake-node-to-node.cddl}
\lstinputlisting[style=cddl]{../../ouroboros-network-protocols/test-cddl/specs/handshake-node-to-node.cddl}
\subsubsection{Node to client handshake mini-protocol}
\lstinputlisting[style=cddl]{../../ouroboros-network/test-cddl/specs/handshake-node-to-client.cddl}
\lstinputlisting[style=cddl]{../../ouroboros-network-protocols/test-cddl/specs/handshake-node-to-client.cddl}

\section{Chain-Sync mini-protocol}
\label{chain-sync-protocol}
Expand Down Expand Up @@ -832,7 +832,7 @@ \subsection{Implementation of the Chain Consumer}
\end{description}

\subsection{CDDL encoding specification}
\lstinputlisting[style=cddl]{../../ouroboros-network/test-cddl/specs/chain-sync.cddl}
\lstinputlisting[style=cddl]{../../ouroboros-network-protocols/test-cddl/specs/chain-sync.cddl}
See appendix \ref{cddl-common} for common definitions.

\section{Block-Fetch mini-protocol}
Expand Down Expand Up @@ -920,7 +920,7 @@ \subsection{State machine}
\end{table}

\subsection{CDDL encoding specification}
\lstinputlisting[style=cddl]{../../ouroboros-network/test-cddl/specs/block-fetch.cddl}
\lstinputlisting[style=cddl]{../../ouroboros-network-protocols/test-cddl/specs/block-fetch.cddl}
See appendix \ref{cddl-common} for common definitions.

\section{Tx-Submission mini-protocol}
Expand Down Expand Up @@ -1023,7 +1023,7 @@ \subsubsection{State machine}
\caption{Tx-Submission mini-protocol (version 2) messages.}
\end{table}
\subsubsection{CDDL encoding specification}\label{tx-submission2-cddl}
\lstinputlisting[style=cddl]{../../ouroboros-network/test-cddl/specs/tx-submission2.cddl}
\lstinputlisting[style=cddl]{../../ouroboros-network-protocols/test-cddl/specs/tx-submission2.cddl}
See version 1 of the mini-protocol in section~\ref{tx-submission-cddl} and
appendix \ref{cddl-common} for common definitions.

Expand Down Expand Up @@ -1121,7 +1121,7 @@ \subsection{State machine}
\end{description}

\subsection{CDDL encoding specification}
\lstinputlisting[style=cddl]{../../ouroboros-network/test-cddl/specs/keep-alive.cddl}
\lstinputlisting[style=cddl]{../../ouroboros-network-protocols/test-cddl/specs/keep-alive.cddl}

\section{Local Tx-Submission mini-protocol}
\haddockref{Ouroboros.Network.Protocol.LocalTxSubmission.Type}{ouroboros-network/Ouroboros-Network-Protocol-LocalTxSubmission-Type\#t:LocalTxSubmission}
Expand Down Expand Up @@ -1260,7 +1260,7 @@ \subsection{State machine}
$AcquireFailurePointNotOnChain$.

\subsection{CDDL encoding specification}
\lstinputlisting[style=cddl]{../../ouroboros-network/test-cddl/specs/local-state-query.cddl}
\lstinputlisting[style=cddl]{../../ouroboros-network-protocols/test-cddl/specs/local-state-query.cddl}
See appendix \ref{cddl-common} for common definitions.

\section{Pipelining of Mini Protocols}
Expand Down
2 changes: 1 addition & 1 deletion docs/network-spec/network-spec.tex
Expand Up @@ -197,7 +197,7 @@ \section*{Version history}
\appendix
\chapter{Common CDDL definitions}
\label{cddl-common}
\lstinputlisting[style=cddl]{../../ouroboros-network/test-cddl/specs/common.cddl}
\lstinputlisting[style=cddl]{../../ouroboros-network-protocols/test-cddl/specs/common.cddl}

\bibliographystyle{apalike}
\bibliography{references}
Expand Down
8 changes: 4 additions & 4 deletions nix/network-docs.nix
Expand Up @@ -2,11 +2,11 @@
with pkgs;
let
src = haskell-nix.haskellLib.cleanGit {
name = "ouroboros-network-docs-src";
name = "ouroboros-network-protocols-docs-src";
src = ../.;
subDir = "docs";
};
cddl-specs = ../ouroboros-network/test-cddl/specs;
cddl-specs = ../ouroboros-network-protocols/test-cddl/specs;
in pkgs.runCommand "ouroboros-network-docs" {
meta.platforms = with pkgs.lib.platforms; [ linux darwin ];
nativeBuildInputs = [ imagemagick ];
Expand All @@ -28,8 +28,8 @@ in pkgs.runCommand "ouroboros-network-docs" {
ln -s ${src}/$d/* docs/$d/
done
mkdir -p ouroboros-network/test-cddl/specs
cp ${cddl-specs}/*.cddl ouroboros-network/test-cddl/specs
mkdir -p ouroboros-network-protocols/test-cddl/specs
cp ${cddl-specs}/*.cddl ouroboros-network-protocols/test-cddl/specs
mkdir -p $out
Expand Down
8 changes: 4 additions & 4 deletions nix/ouroboros-network.nix
Expand Up @@ -73,7 +73,7 @@ let
({ pkgs, ... }:
lib.mkIf pkgs.stdenv.hostPlatform.isWindows {
# ruby/perl dependencies cannot be cross-built for cddl tests:
packages.ouroboros-network.flags.cddl = false;
packages.ouroboros-network-protocols.flags.cddl = false;

# Make sure we use a buildPackages version of happy
packages.pretty-show.components.library.build-tools =
Expand All @@ -88,10 +88,10 @@ let
# Options for when not compiling to windows:
({ pkgs, ... }:
lib.mkIf (!pkgs.stdenv.hostPlatform.isWindows) {
packages.ouroboros-network.flags.cddl = true;
packages.ouroboros-network.components.tests.cddl.build-tools =
packages.ouroboros-network-protocols.flags.cddl = true;
packages.ouroboros-network-protocols.components.tests.cddl.build-tools =
[ pkgs.cddl pkgs.cbor-diag ];
packages.ouroboros-network.components.tests.cddl.preCheck =
packages.ouroboros-network-protocols.components.tests.cddl.preCheck =
"export HOME=`pwd`";
})
# Fix for Plutus compilation with profiling
Expand Down
7 changes: 5 additions & 2 deletions release.nix
Expand Up @@ -94,17 +94,20 @@ let
];
in [ [ "shell" ] ] ++ (optionals (!withProblematicWindowsTests)
((checksPaths [ "ouroboros-network" "test" ])
++ (checksPaths [ "monoidal-synchronisation" "test" ])
++ (checksPaths [ "Win32-network" "test" ])
++ (checksPaths [ "network-mux" "test" ])
++ (checksPaths [ "ouroboros-network-framework" "test" ])
++ (checksPaths [ "ouroboros-network-protocols" "test" ])
++ (checksPaths [ "ouroboros-network-protocols" "cddl" ])
++ (checksPaths [ "ouroboros-network-testing" "test" ]) ++ [
[ "haskellPackages" "ouroboros-network" "coverageReport" ]
[ "haskellPackages" "Win32-network" "coverageReport" ]
[ "haskellPackages" "network-mux" "coverageReport" ]
[ "haskellPackages" "ouroboros-network-protocols-test" "coverageReport" ]
[ "haskellPackages" "ouroboros-network-framework" "coverageReport" ]
[ "haskellPackages" "ouroboros-network-testing" "coverageReport" ]
])) ++ (testsPaths [ "ouroboros-network" "cddl" ])
++ (checksPaths [ "ouroboros-network" "cddl" ])
])) ++ (testsPaths [ "ouroboros-network-protocols-test" "cddl" ])
++ (exesPaths [ "network-mux" "cardano-ping" ]) ++ [[ "checks" "styles" ]]
++ onlyBuildOnDefaultSystem;

Expand Down

0 comments on commit f5368db

Please sign in to comment.