From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 4K5hD0eJVmV/OwAA9RJhRA:P1 (envelope-from ) for ; Thu, 16 Nov 2023 22:27:35 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 4K5hD0eJVmV/OwAA9RJhRA (envelope-from ) for ; Thu, 16 Nov 2023 22:27:35 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D6E4A36A49 for ; Thu, 16 Nov 2023 22:27:34 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=johnericson.me header.s=fm3 header.b="c k2ve2W"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=Bmv89Jcs; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1700170055; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=jhMWUZcfJuL/4tEq7/Qb1xCh6UQdD3XscBuBpC2La/0=; b=rkBmgW2ndRoK+AeEapChE6bsOoz+zafkX+UZMvmY14BDwYHqwvHtyrZNHiCgI8r0nrKXIt txmMfyfLH2lJakPQORIjoFI0cwvzxwz6YSUobAXA+xF8y6yOPXmUBmI+3pEi6nZSEha9Gt 9DCin1QLW6o6dQ3p0T7d1RELS3HFtew5dqougn/iQ35P4SjfZj9NC248ZjmtpGPUh6Gc89 cB6YiBgRvndvSIs7UjRaW6V/zwu990v3ykSeToNqO3rsXOjtLgag4ED+Wpv0QAtJm7p0Bo cElQ4XhJ8ys1CmWb2SN9DfosqxDlr5GGIZCE2pxTU5A4R8s4LxQ/T3JEz02HVQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=johnericson.me header.s=fm3 header.b="c k2ve2W"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=Bmv89Jcs; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1700170055; a=rsa-sha256; cv=none; b=Q2bzrkLpgxIWn8H+Etop/4WpORCAtKeZZqn++qw7kKlZMiD7fzXeG4JfsstzuR43WJOJYf +tOv71HlAheaVN6uiNSEWlKnERzuittdn16+4wZUwURTEc6vqBswxiUHfJBggV2tEivJYr dsvonP+q8mv3sXvQnizV7zYFZ1e4pDht5X0HFKfCNFde1LJNYJgE0v81AuSr+DgLyLE5c8 V2jAbAR2L3zYvi6LBCeHOgHOUKIoJIROLtGpkFg1KKHjL2N4nfbRhS0NRONRpkQik2nqaY 8G1KJ02twycMmax/BXMkYEv1gGhwR3tg+aN6YWCIlvXz0rrULNX4UVy7t9Ektw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3jsv-0005um-VI; Thu, 16 Nov 2023 16:26:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3hy4-0007zh-Pr for guix-devel@gnu.org; Thu, 16 Nov 2023 14:24:02 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3hy1-0003Ko-I6; Thu, 16 Nov 2023 14:24:00 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 46F5132005BC; Thu, 16 Nov 2023 14:23:51 -0500 (EST) Received: from imap44 ([10.202.2.94]) by compute2.internal (MEProxy); Thu, 16 Nov 2023 14:23:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnericson.me; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1700162630; x= 1700249030; bh=jhMWUZcfJuL/4tEq7/Qb1xCh6UQdD3XscBuBpC2La/0=; b=c k2ve2WgCQxZBz8gWM14xkWMoV51SzfhG5ADex8mOceqB5qRD100XrVWn5m3xoe+H H5wy/uqb/b0zmyeVxcRM00ckiDdaJlFsJkF6LYNVrkolcpIT8F0L37GXEdXyzalF 99tQ4U+c+3nXkdC72eRyXO+G0BszMgdfJLCdgGU8PKki6EF4oFR2huyHTG3xOI4/ oXIj9E5Efn3UFzbk+sXzBi5Dw/S5H7QLuW/MCfInH6GEhsML09boEh7Ucqdze4TT +owq4CNgDoUKAwW1+ylKLHILwBRqZxrVPdEL/L6H5iLbaQ8gPGCrWhyz4J/BMdzw XZ4CNWSdyqLU/JV4OLx7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1700162630; x=1700249030; bh=jhMWUZcfJuL/4 tEq7/Qb1xCh6UQdD3XscBuBpC2La/0=; b=Bmv89JcsTNZGxpraoRZmvMspCx7t4 Zf8wYSPHN9CtrqH427/4tS9qhKJS5LMWS4kp7kxgv3TqQVSyZjnd8bsmi1uUGxKR JFbde1pcbFd71LOPuLMKWxEwXAoIE4d1aCW15c6DvriNXdCIbagCQ2lAdzV5V6+u qXRq797M5mPUEIB/2boFxuraIbqQHssfgeAnChdvMhc5gjR4wkev76zvp2Ys31RE POLj2XhNDV2AyWkMHIB3hD7NeT8jBPajkeZ+IHcwp2xwcbvrek4tbu5ZY+75ti/Q V5uQueEzvb9yo4fAulWb1TTPBy3jkYI5DqTE3yFYPkgM58yCvwELPYyHA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudefkedguddvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesrgdtreerreerjeenucfhrhhomhepfdfl ohhhnhcugfhrihgtshhonhdfuceolhhishhtsehjohhhnhgvrhhitghsohhnrdhmvgeqne cuggftrfgrthhtvghrnheptdduhfevheejjeevteetgedutdffteelheetveejudfgueej feeljeelhefgueehnecuffhomhgrihhnpehgihhthhhusgdrtghomhdptddufeegqdhnih igqdhsthhorhgvqdhlrgihvghrrdhmugdpnhhigihoshdrohhrghdphhgrshhkvghllhdr ohhrghdpghhnuhdrohhrghdptddufeefqdhgihhtqdhhrghshhhinhhgrdhmugdpshhofh htfigrrhgvhhgvrhhithgrghgvrdhorhhgpdhosghsihguihgrnhdrshihshhtvghmshen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlihhsth esjhhohhhnvghrihgtshhonhdrmhgv X-ME-Proxy: Feedback-ID: id3f144f1:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0710436A0075; Thu, 16 Nov 2023 14:23:50 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1108-g3a29173c6d-fm-20231031.005-g3a29173c MIME-Version: 1.0 Message-Id: In-Reply-To: <87bkbtvigj.fsf@gnu.org> References: <87bkbtvigj.fsf@gnu.org> Date: Thu, 16 Nov 2023 14:23:29 -0500 From: "John Ericson" To: guix-devel@gnu.org, =?UTF-8?Q?Ludovic_Court=C3=A8s?= , "Christopher Baines" Cc: "Florian Klink" , "Valentin Gagarin" , "Maxim Cournoyer" Subject: Ensuring daemon interop, maybe also store layer standardization? Content-Type: multipart/alternative; boundary=1c85e9721932457babb9a8975868b271 Received-SPF: pass client-ip=64.147.123.21; envelope-from=list@johnericson.me; helo=wout5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 16 Nov 2023 16:26:47 -0500 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 1.32 X-Spam-Score: 1.32 X-Migadu-Queue-Id: D6E4A36A49 X-Migadu-Scanner: mx10.migadu.com X-TUID: ADAauihOTq9G --1c85e9721932457babb9a8975868b271 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, Nov 16, 2023, at 10:14 AM, Ludovic Court=C3=A8s wrote: > My take is that the daemon rewrite in Guix will aim for 100% > compatibility at the protocol level (in fact part of what=E2=80=99s ne= eded is > already available as (guix =E2=80=A6) modules), probably with just the= same > feature set. Christopher Baines may have clearer ideas. Excellent! I am glad that Florian already emailed about this, I had similar thought= s. I have long been a proponent of ensuring interoperability in the "store = layer" between Nix, Guix, Tvix, and anyone else that wants to have an im= plementation. (To me, the daemon is just one possible implementation, an= RPC bridge to another implementation.) There are some good developments= on the Nix side in this space I've been meaning to email this mailing l= ist about. Glad the recent guix-daemon work and ensuing discussion are f= inally getting me to do so! Here they are: =E2=80=A2 RFC 134 https://github.com/NixOS/rfcs/blob/master/rfcs/0134-n= ix-store-layer.md: this is the linchpin holding a few things together on= the Nix side. Nix gone back and forth over the years emphasizing the de= gree to which the store layer beneath the Nix language is self-contained= and can be used/understood on its own. With that RFC we're finally comm= itting to "show off the store layer" as official policy. =E2=80=A2 https://nixos.org/manual/nix/unstable/store/ there is a new t= op-level section of the Nix manual that is commentating the store-layer.= Expect it to grow rapidly in the coming months as new information is wr= itten, and existing information that belongs here but is tagging along e= lsewhere is moved here. =E2=80=A2 Unit tests with external data "golden masters" for serializes= for the daemon protocol https://github.com/NixOS/nix/tree/master/unit-t= est-data/libstore/worker-protocol, and derivation ATerm format https://g= ithub.com/NixOS/nix/tree/master/unit-test-data/libstore/derivation. (Sin= ce the Guix fork I've tried to systematize the daemon protocol with bidi= rectional serializers for explicit data types, which the RPC layer uses.= ) The test data is separate files with the explicit intention of making = them easy to reuse in other implementations :), as opposed to just in-co= de string/binary literals which would be very inconvenient for them. =E2=80=A2 https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix= 3-derivation-add making sure the JSON derivation format is round-tripabl= e with a new command, for ease of use and in hopes that we might someday= ditch "ATerm" for the on-disk format for everyone's benefit. =E2=80=A2 https://github.com/NixOS/nix/pull/8699 C bindings for the Nix= store. Perhaps this isn't so important now that you all are going for t= he full rewrite, but I saw Maxim's early email about creating guile bind= ings for a gradual rewrite. The C bindings are explicitly made with the = idea of making other langauge bindings easier (e.g. https://github.com/N= ixOS/nix/pull/7735, https://hackage.haskell.org/package/hercules-ci-cnix= -store). Still mentioning this in case it is useful as a "Plan B". Furthermore, I hope that beyond merely ensuring some interop with what w= e have already, we work to further keep things in sync and hopefully con= verging (where was have diverging new features like Blake hashing in Gui= x and content-addressed derivations in Nix) going forward. To that end, = I would love to set up an implementation-agnostic standard, maybe even a= n IETF standard (!). I think while we all have different ideas (and should continue to have d= ifferent ideas!) on what the user-facing package language looks like, we= do essential agree on what this store interface looks like. It is a "na= rrow waist" which can be implemented numerous different ways, and used i= n numerous different high level packaging paradigms. It is this quality = that makes it so worthy of standardization. > I=E2=80=99m interested in hearing how you view content-addressing and = its use. > In Guix there=E2=80=99s one proposal based on ERIS: >=20 > https://issues.guix.gnu.org/52555#8 >=20 > Previously there was an experiment to implement what you described at > =E2=80=9Cpartial substitution=E2=80=9D: >=20 > https://lists.gnu.org/archive/html/guix-devel/2021-01/msg00080.html I have been talking a lot to Florian about these things too. Long ago I = emailed Ludo and some others about the IPFS & Nix work. Since then RFC 1= 33 was accepted, https://github.com/NixOS/rfcs/blob/master/rfcs/0133-git= -hashing.md, which prepares the way for a lot of that, and more recently= https://github.com/NixOS/nix/pull/9294 (merged) has begun the implement= ation. It sounds like this ERIS plan and Tvix's content addressing are fairly s= imilar --- use improved content addressing "underneath the hood". The th= ing I have been working on is trying to expose content-addressing all th= e way into the store path for end-to-end trustlessless. I think for build artifacts, either way is fine. But for source code the= end-to-end trustlessness is nice for treating things like Software Heri= tage as a substituter of last resort. (I made https://docs.softwareherit= age.org/devel/swh-web/uri-scheme-api.html#get--api-1-raw-(swhid)- forto = spit out raw git objects for https://blog.obsidian.systems/software-heri= tage-bridge/, but the pipelining latency issues mean something like SWH'= s "Vault API" is probably better.) ---------- That's a big wall of text, but glad it's all out there. Stuff is really = cooking in all our ecosystems these days, and I'm very excited for where= things are going! John --1c85e9721932457babb9a8975868b271 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Thu, No= v 16, 2023, at 10:14 AM, Ludovic Court=C3=A8s wrote:
My take is that the daemon rew= rite in Guix will aim for 100%
compatibility at the protoc= ol level (in fact part of what=E2=80=99s needed is
already= available as (guix =E2=80=A6) modules), probably with just the same
=
feature set.  Christopher Baines may have clearer ideas.=

Excellent!

=
I am glad that Florian already emailed about this, I had= similar thoughts.

I have long been a propo= nent of ensuring interoperability in the "store layer" between Nix, Guix= , Tvix, and anyone else that wants to have an implementation. (To me, th= e daemon is just one possible implementation, an RPC bridge to another i= mplementation.) There are some good developments on the Nix side in this= space I've been meaning to email this mailing list about. Glad the rece= nt guix-daemon work and ensuing discussion are finally getting me to do = so! Here they are:
  • RFC 134 https://github.co= m/NixOS/rfcs/blob/master/rfcs/0134-nix-store-layer.md: this is the l= inchpin holding a few things together on the Nix side. Nix gone back and= forth over the years emphasizing the degree to which the store layer be= neath the Nix language is self-contained and can be used/understood on i= ts own. With that RFC we're finally committing to "show off the store la= yer" as official policy.
  • https://nixos.org/manual/nix/unstable/store/ t= here is a new top-level section of the Nix manual that is commentating t= he store-layer. Expect it to grow rapidly in the coming months as new in= formation is written, and existing information that belongs here but is = tagging along elsewhere is moved here.
  • Unit tests with exter= nal data "golden masters" for serializes for the daemon protocol https://github.com/NixOS/nix/tree/master/unit-test-data/li= bstore/worker-protocol, and derivation ATerm format = https://github.com/NixOS/nix/tree/master/unit-test-data/libstore/derivat= ion. (Since the Guix fork I've tried to systematize the daemon proto= col with bidirectional serializers for explicit data types, which the RP= C layer uses.) The test data is separate files with the explicit intenti= on of making them easy to reuse in other implementations :), as opposed = to just in-code string/binary literals which would be very inconvenient = for them.
  • https://nixos.org/manual/nix/uns= table/command-ref/new-cli/nix3-derivation-add making sure the JSON d= erivation format is round-tripable with a new command, for ease of use a= nd in hopes that we might someday ditch "ATerm" for the on-disk format f= or everyone's benefit.
  • https://github.com/NixOS/nix/pull/8699 C bindings for = the Nix store. Perhaps this isn't so important now that you all are goin= g for the full rewrite, but I saw Maxim's early email about creating gui= le bindings for a gradual rewrite. The C bindings are explicitly made wi= th the idea of making other langauge bindings easier (e.g. https://github.com/NixOS/nix/pull/= 7735, https://hackage.haskell.org/package/hercules-ci-cnix-store)= . Still mentioning this in case it is useful as a "Plan B".
  • Furthermore, I hope that beyond merely ensuring some interop with = what we have already, we work to further keep things in sync and hopeful= ly converging (where was have diverging new features like Blake hashing = in Guix and content-addressed derivations in Nix) going forward. To that= end, I would love to set up an implementation-agnostic standard, maybe = even an IETF standard (!).

    I think while we= all have different ideas (and should continue to have different ideas!)= on what the user-facing package language looks like, we do essential ag= ree on what this store interface looks like. It is a "narrow waist" whic= h can be implemented numerous different ways, and used in numerous diffe= rent high level packaging paradigms. It is this quality that makes it so= worthy of standardization.

I=E2=80=99m interested in hearing = how you view content-addressing and its use.
In Guix there= =E2=80=99s one proposal based on ERIS:


Previously there wa= s an experiment to implement what you described at
=E2=80=9C= partial substitution=E2=80=9D:


I have been talking a = lot to Florian about these things too. Long ago I emailed Ludo and some = others about the IPFS & Nix work. Since then RFC 133 was accepted, <= a href=3D"https://github.com/NixOS/rfcs/blob/master/rfcs/0133-git-hashin= g.md">https://github.com/NixOS/rfcs/blob/master/rfcs/0133-git-hashing.md= , which prepares the way for a lot of that, and more recently https://github.com/NixOS/ni= x/pull/9294 (merged) has begun the implementation.
It sounds like this ERIS plan and Tvix's content addres= sing are fairly similar --- use improved content addressing "underneath = the hood". The thing I have been working on is trying to expose content-= addressing all the way into the store path for end-to-end trustlessless.=

I think for build artifacts, either way is= fine. But for source code the end-to-end trustlessness is nice for trea= ting things like Software Heritage as a substituter of last resort. (I m= ade https://docs.softwareheritage.org/de= vel/swh-web/uri-scheme-api.html#get--api-1-raw-(swhid)- forto spit o= ut raw git objects for https://blog.obsidian.systems/software-heritage-bridg= e/, but the pipelining latency issues mean something like SWH's "Vau= lt API" is probably better.)

---= -------

That's a big wall of text, but glad= it's all out there. Stuff is really cooking in all our ecosystems these= days, and I'm very excited for where things are going!
<= div>
John
--1c85e9721932457babb9a8975868b271--