about summary refs log tree commit diff
path: root/tvix/docs
diff options
context:
space:
mode:
authorBrian Olsen <brian@maven-group.org>2024-11-03T13·24+0100
committerBrian Olsen <brian@maven-group.org>2024-11-03T20·49+0000
commit28dbf5f0eb0306d7675ec83475e14c79b05b310d (patch)
tree292f13498fd6d2a18e4bb33381690202ac400a4c /tvix/docs
parentf02bc522b66dda707a7ef469082e56fc0df46569 (diff)
chore(tvix/docs): Small changes to Nix Daemon protocol description r/8884
I found some more operations that are obsolete and a few missing
fields. I also did some small changes to make handshake description
more consistent.

Change-Id: I9f853a37e9d50621491f31ea71879d6a600046e2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12724
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/docs')
-rw-r--r--tvix/docs/src/nix-daemon/changelog.md4
-rw-r--r--tvix/docs/src/nix-daemon/handshake.md6
-rw-r--r--tvix/docs/src/nix-daemon/logging.md1
-rw-r--r--tvix/docs/src/nix-daemon/operations.md2
-rw-r--r--tvix/docs/src/nix-daemon/serialization.md16
5 files changed, 15 insertions, 14 deletions
diff --git a/tvix/docs/src/nix-daemon/changelog.md b/tvix/docs/src/nix-daemon/changelog.md
index 41c168374c50..4cc1ccbbd522 100644
--- a/tvix/docs/src/nix-daemon/changelog.md
+++ b/tvix/docs/src/nix-daemon/changelog.md
@@ -52,7 +52,7 @@ So this means that any version of Nix 2.x can't talk to Nix 0.x.
 | QueryDeriver    | 18 | [6d1a1191b0][6d1a1191b0] || 0.11 | Obsolete [e0204f8d46][e0204f8d46]<br>Nix 2.0 Protocol 1.16 |
 | SetOptions      | 19 | [f3441e6122][f3441e6122] || 0.11 ||
 | CollectGarbage              | 20 | [a72709afd8][a72709afd8] | 1.02  | 0.12   ||
-| QuerySubstitutablePathInfo  | 21 | [03427e76f1][03427e76f1] | 1.02  | 0.12   ||
+| QuerySubstitutablePathInfo  | 21 | [03427e76f1][03427e76f1] | 1.02  | 0.12   | Obsolete Nix 1.2 Protocol 1.12 |
 | QueryDerivationOutputs      | 22 | [e42401ee7b][e42401ee7b] | 1.05  | 1.0    | Obsolete [d38f860c3e][d38f860c3e]<br>Nix 2.4 Protocol 1.22* |
 | QueryAllValidPaths          | 23 | [24035b98b1][24035b98b1] | 1.05  | 1.0    ||
 | *QueryFailedPaths            | 24 | [f92c9a0ac5][f92c9a0ac5] | 1.05  | 1.0    | Removed [8cffec848][8cffec848]<br>Nix 2.0 Protocol 1.16 |
@@ -61,7 +61,7 @@ So this means that any version of Nix 2.x can't talk to Nix 0.x.
 | ImportPaths                 | 27 | [273b288a7e][273b288a7e] | 1.09  | 1.0    | Obsolete [538a64e8c3][538a64e8c3]<br>Nix 2.0 Protocol 1.17 |
 | QueryDerivationOutputNames  | 28 | [af2e53fd48][af2e53fd48]<br>([194d21f9f6][194d21f9f6]) | 1.08      | 1.0 | Obsolete<br>[045b07200c][045b07200c]<br>Nix 2.4 Protocol 1.21 |
 | QueryPathFromHashPart       | 29 | [ccc52adfb2][ccc52adfb2] | 1.11  | 1.1    ||
-| QuerySubstitutablePathInfos | 30 | [eb3036da87][eb3036da87] | 1.12* | 1.2    ||
+| QuerySubstitutablePathInfos | 30 | [eb3036da87][eb3036da87] | 1.12* | 1.2    | Obsolete Nix 2.0, Protocol 1.19*|
 | QueryValidPaths             | 31 | [58ef4d9a95][58ef4d9a95] | 1.12  | 1.2    ||
 | QuerySubstitutablePaths     | 32 | [09a6321aeb][09a6321aeb] | 1.12  | 1.2    ||
 | QueryValidDerivers          | 33 | [2754a07ead][2754a07ead] | 1.13* | 1.3    ||
diff --git a/tvix/docs/src/nix-daemon/handshake.md b/tvix/docs/src/nix-daemon/handshake.md
index 0a436372b3ff..ccf366cd3b27 100644
--- a/tvix/docs/src/nix-daemon/handshake.md
+++ b/tvix/docs/src/nix-daemon/handshake.md
@@ -3,7 +3,7 @@
 ## client -> server
 - 0x6e697863 :: [Int](#int) (hardcoded, 'nixc' in ASCII)
 
-## server -> client
+## client <- server
 - 0x6478696f :: [Int](#int) (hardcoded, 'dxio' in ASCII)
 - protocolVersion :: [Int](#int)
 
@@ -19,7 +19,7 @@
 - reserveSpace :: [Bool](#bool) (obsolete, ignored and set to false)
 
 
-## server -> client
+## client <- server
 
 ### If clientVersion is 1.33 or later
 - nixVersion :: String
@@ -27,6 +27,6 @@
 ### If clientVersion is 1.35 or later
 - trusted :: OptTrusted
 
-## server -> client
+## client <- server
 - send logs
 - [operation](./operations.md) :: Int
\ No newline at end of file
diff --git a/tvix/docs/src/nix-daemon/logging.md b/tvix/docs/src/nix-daemon/logging.md
index c2828b13c21a..b6522c867100 100644
--- a/tvix/docs/src/nix-daemon/logging.md
+++ b/tvix/docs/src/nix-daemon/logging.md
@@ -96,6 +96,7 @@ Implemented in protocol 1.20. When backwards compatible with older versions of
 the protocol and this message would have been sent it is instead ignored.
 
 - 0x53544f50 :: [UInt64][se-UInt64] (hardcoded, 'STOP' in ASCII)
+- act :: [UInt64][se-UInt64]
 
 
 ### `STDERR_RESULT`
diff --git a/tvix/docs/src/nix-daemon/operations.md b/tvix/docs/src/nix-daemon/operations.md
index 80708c9104b5..64e672373116 100644
--- a/tvix/docs/src/nix-daemon/operations.md
+++ b/tvix/docs/src/nix-daemon/operations.md
@@ -4,7 +4,6 @@
 | Operation                                                   | Id |
 | ----------------------------------------------------------- | -- |
 | [IsValidPath](#isvalidpath)                                 | 1  |
-| [HasSubstitutes](#hassubstitutes)                           | 3  |
 | [QueryReferrers](#queryreferrers)                           | 6  |
 | [AddToStore](#addtostore)                                   | 7  |
 | [BuildPaths](#buildpaths)                                   | 9  |
@@ -40,6 +39,7 @@
 
 | Operation                                                   | Id |
 | ----------------------------------------------------------- | -- |
+| [HasSubstitutes](#hassubstitutes)                           | 3  |
 | [QueryPathHash](#querypathhash)                             | 4  |
 | [QueryReferences](#queryreferences)                         | 5  |
 | [AddTextToStore](#addtexttostore)                           | 8  |
diff --git a/tvix/docs/src/nix-daemon/serialization.md b/tvix/docs/src/nix-daemon/serialization.md
index 1042c956ba71..4d165456d612 100644
--- a/tvix/docs/src/nix-daemon/serialization.md
+++ b/tvix/docs/src/nix-daemon/serialization.md
@@ -144,11 +144,11 @@ An [Int](#int) enum with the following possible values:
 ### OptTrusted
 An [UInt8](#uint8) optional enum with the following possible values:
 
-| Name             | Int |
-| ---------------- | --- |
-| None             |  0  |
-| Some(Trusted)    |  1  |
-| Some(NotTrusted) |  2  |
+| Name       | Int |
+| ---------- | --- |
+| Unknown    |  0  |
+| Trusted    |  1  |
+| NotTrusted |  2  |
 
 
 ## Bytes serializers
@@ -340,15 +340,15 @@ Optional microseconds.
 - env :: [Map](#map-of-x-to-y) of [String](#string) to [String](#string)
 
 ### TraceLine
-- havePos :: [Size](#size) (hardcoded to 0)
+- havePos :: [Size](#size) (hardcoded to 0 with assert on read)
 - hint :: [String](#string) (If logger is JSON, invalid UTF-8 is replaced with U+FFFD)
 
 ### Error
-- type :: [String](#string) (hardcoded to `Error`)
+- type :: [String](#string) (hardcoded to `Error` with assert on read)
 - level :: [Verbosity](#verbosity)
 - name :: [String](#string) (removed and hardcoded to `Error`)
 - msg :: [String](#string) (If logger is JSON, invalid UTF-8 is replaced with U+FFFD)
-- havePos :: [Size](#size) (hardcoded to 0)
+- havePos :: [Size](#size) (hardcoded to 0 with assert on read)
 - traces :: [List](#list-of-x) of [TraceLine](#traceline)
 
 ## Field