From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gF6zBEk8Z2DZZgAAgWs5BA (envelope-from ) for ; Fri, 02 Apr 2021 17:46:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 8FUbOkg8Z2AybgAAbx9fmQ (envelope-from ) for ; Fri, 02 Apr 2021 15:46:16 +0000 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 AEC5D2398A for ; Fri, 2 Apr 2021 17:46:16 +0200 (CEST) Received: from localhost ([::1]:55400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSLzz-0005H6-EX for larch@yhetil.org; Fri, 02 Apr 2021 11:46:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSLzQ-0005E4-Ff for guix-devel@gnu.org; Fri, 02 Apr 2021 11:45:41 -0400 Received: from mail2.protonmail.ch ([185.70.40.22]:46134) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSLzL-0007Z0-VW for guix-devel@gnu.org; Fri, 02 Apr 2021 11:45:39 -0400 Date: Fri, 02 Apr 2021 15:45:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rishi.is; s=protonmail; t=1617378323; bh=Qu8RhJJhCn5HE95EIh8vjhHA4/8q+L9V4QwOgvY6A2o=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=0FHoASlyguDeGM0j91S+4zsYYLwHUABgzFTccfaRn6x1kXu9r2sKabOsIor60uAJB 2K6pAk288SwHWXQQr6FQtQHm1fJp1yiIpZHeoY8V2J6Ba6mBoMIlImHyRSxvXmEWvh I+cPoZww9OGr/DYC7yMsVjGLEX8sWsVMGkewOQ+Q= To: Bengt Richter From: ilmu Subject: Re: Deep vs Shallow trace: Removing the tradeoff? Message-ID: In-Reply-To: <20210330202030.GA2811@LionPure> References: <01A29E7C-0E60-4518-A775-92B6F6A8B816@lepiller.eu> <20210330202030.GA2811@LionPure> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.22; envelope-from=ilmu@rishi.is; helo=mail2.protonmail.ch 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ilmu Cc: "guix-devel@gnu.org" Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617378376; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Qu8RhJJhCn5HE95EIh8vjhHA4/8q+L9V4QwOgvY6A2o=; b=L1YhXSsa8fP4IScMR7nmDtmPwnEisXp42c1NfMmIKVxeUTWxLZrI55OPat9cVWljaQABNT jZJCa1nhLeL88nL/SE+sUH7sRIAyuXUhiFJO+Ia0TyO4a7w7QV+KxMwYmpvVEpbJBJp5pN nORg4xTAbSSSzK+ce2mr2CzY2Qr4B3nQ5EAYLtCqA42kK8tQMvOAS7tIkNlNDje4UDCDZG bW32ZRXDOgErim2T+Zgud2eYmlggKCISFkmJFxCLDN4b9AsguEO2YZxeFTCe3NKLubAmZ3 S+S5Qla+mHT3NrBkI3U5K7omuaF+HNk6ITEvNV/nk1bFp40YU8zJsoBrggJyoQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617378376; a=rsa-sha256; cv=none; b=ekzkhibbzO/Gbdf9eL3TZKPuwAoMNkCYl4VYtvdC3kF/C7t3klpSx9fXMg0t234pkaONCY jd6cdG3fv/2YH06gof+In3zCqCof4SiW9PE+ZCLkHUe+xrdn0ZLQOFj0M3vLbidWPHoirg TzeKFOLz042wkQ7wYlj4ivaIX0NLyizXAq/k7xt9QKd7V9P/P3HvygPzRIsTC8CUXceCWe MmeOJCXa76OfyzPHvYQBa0v2z7FQWg4GuKkhLXMkNqkDleCX0CCKDezr1txeDFeYZL8zpp W4vzA0vSZ+K/uGOeuMLE8PvVA/ZiM9wGxrVFN6IFCHBlYu+81r462KeYVP5PAQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rishi.is header.s=protonmail header.b=0FHoASly; dmarc=fail reason="SPF not aligned (relaxed)" header.from=rishi.is (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: 1.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rishi.is header.s=protonmail header.b=0FHoASly; dmarc=fail reason="SPF not aligned (relaxed)" header.from=rishi.is (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: AEC5D2398A X-Spam-Score: 1.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4YnYhntYNWHM > > Early cutoff is a very desirable property that nix does not have (and I= assume therefore that neither does guix). > The =E2=80=9Cintensional model=E2=80=9D that Julien mentioned, or what th= e Nix folks now > refer to as =E2=80=9Ccontent-addressed derivations=E2=80=9D, have this ea= rly cutoff > property. It=E2=80=99s one of the main motivations for this whole endeav= ors. > This document shows how Nix folks are working on retrofitting > =E2=80=9Ccontent-addressed derivations=E2=80=9D into Nix: > https://github.com/tweag/rfcs/blob/cas-rfc/rfcs/0062-content-addressed-= paths.md This looks to me to be massively more complicated and also needing stronger= assumptions about how reproducible the builds are. However I am not even s= ure I understand the proposals that well... Thank you for bringing this to my attention though, does guix have any plan= s to do something like this? > I have long been wondering if reproducibility is too exclusively focused > on the source transformation chain and the tools implementing that. > > E.g., for programs that execute like side-effect-free functions, > why not an early-cutoff based on a functionally well-tested upgrade > written in a different language, with a totally different source? > > If you source the following in a subshell > > cat ./early-cutoff.txt > --8<---------------cut here---------------start------------->8--- > > export HELLO_TO=3DWorld > > strace -qqxs120 -e write \ > guile -c '(let* ((msg (string-append "Hello " (getenv "HELLO_TO") "\n")))= (display msg))' |& tr , $'\n'|grep '^ *"' > > strace -qqxs120 -e write \ > echo "Hello $HELLO_TO" |& tr , $'\n'|grep '^ *"' > > --8<---------------cut here---------------end--------------->8--- > > Like, > > (. early-cutoff.txt) > --8<---------------cut here---------------start------------->8--- > "Hello World\n" > "Hello World\n" > --8<---------------cut here---------------end--------------->8--- > > It informally shows that in a particular context, > > --8<---------------cut here---------------start------------->8--- > guile -c '(let* ((msg (string-append "Hello " (getenv "HELLO_TO") "\n")))= (display msg))' > --8<---------------cut here---------------end--------------->8--- > > can substitute for > --8<---------------cut here---------------start------------->8--- > echo "Hello $HELLO_TO" > --8<---------------cut here---------------end--------------->8--- > > So, what kinds of build sequences could be cut off early if you ignore ho= w > you produced the code (i.e. just compile whatever source you like with wh= atever > tools you like) so long as the resultant code passed the functionality te= sts? Yes! Precisely, we should be able to switch out the implementations so long= as we can prove that the result is the same. At the limit we are essential= ly saying that extensionally equal things can be swapped for one another. H= owever, extensional equality is pretty much impossible to calculate in the = general case (you'd need to prove it constructively) and of course your exa= mple does not have intensional equality (which is the whole point of switch= ing out the dependency, to improve the implementation, i.e. break intension= al equality while keeping extensional equality). The equality that we can keep using the succinct arguments of knowledge is = extensional because in the special case of build systems we can use a depen= dency at build time and then if the resulting artefact is unchanged then we= can do the early cut-off. So we depend on the property that an artefact ca= n be used independently once built, so for example two versions of a compil= er may give the same binary and then updating a compiler will allow you to = only rebuild transitive closures of programs that depended on changed behav= iors between versions. To drive the point home: If the artefact has the same hash as it did before= then clearly the underlying change did not affect it. Early cut-off is the= refore not possible in the case where the program being depended on is supp= osed to be used at runtime. This is at least how I am thinking about it, I think this would be a good i= ncremental improvement on the state of the art but it would still have thes= e limitations. Kind regards, - ilmu