From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IBlNBuL1wmNieQAAbAwnHQ (envelope-from ) for ; Sat, 14 Jan 2023 19:35:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MEc3BuL1wmMTyAAAauVa8A (envelope-from ) for ; Sat, 14 Jan 2023 19:35:14 +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 E707C39D75 for ; Sat, 14 Jan 2023 19:35:08 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGlMv-0006mW-4z; Sat, 14 Jan 2023 13:35:05 -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 1pGlMs-0006mK-QT for guix-patches@gnu.org; Sat, 14 Jan 2023 13:35:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGlMs-0002yF-Hz for guix-patches@gnu.org; Sat, 14 Jan 2023 13:35:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pGlMs-0005am-9K for guix-patches@gnu.org; Sat, 14 Jan 2023 13:35:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52555] [RFC PATCH 0/3] Decentralized substitute distribution with ERIS Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 14 Jan 2023 18:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52555 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: pukkamustard Cc: 52555@debbugs.gnu.org Received: via spool by 52555-submit@debbugs.gnu.org id=B52555.167372125821438 (code B ref 52555); Sat, 14 Jan 2023 18:35:02 +0000 Received: (at 52555) by debbugs.gnu.org; 14 Jan 2023 18:34:18 +0000 Received: from localhost ([127.0.0.1]:55540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGlMA-0005Zg-8h for submit@debbugs.gnu.org; Sat, 14 Jan 2023 13:34:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGlM8-0005ZU-BV for 52555@debbugs.gnu.org; Sat, 14 Jan 2023 13:34:16 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGlM2-0002vj-MD; Sat, 14 Jan 2023 13:34:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=SFTfqQoee9qpEyWGtHXAD/XLzDkFAkcQbvVEndvv5xw=; b=BsjzBRezuNKoAEzw+n9/ te4Wq3z7KExrDw98ADv1iIJlwTi2AwcyFApC6lWY5mu+w7Z11EJepRIbPm0HITtRE6YjudYF9J8RO nfxauRqctxBRHsNNCeGi/7ITbkvno0UP2pfhGqb39LCfFgBdq1Ws7Z4OMil3kvMdzkZbDS4f1gDy6 QNzmXtzso4GFLVaxN/vWfyIjsty+jfn8A57oK6Mey89xwgYw+q6b3EkSUXPjTzvcVnL271YUlaHaM asp51l0x88aNVdoi8bIKyJM2bqYfzpNleHv82n3NKioaloeHx0JngKHzuf2buVzJj9VPvoVnslr0H V5l0BzT6sZjIfg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGlM0-00036V-3D; Sat, 14 Jan 2023 13:34:10 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20221229181327.758-1-pukkamustard@posteo.net> <20221229181327.758-2-pukkamustard@posteo.net> Date: Sat, 14 Jan 2023 19:34:06 +0100 In-Reply-To: <20221229181327.758-2-pukkamustard@posteo.net> (pukkamustard@posteo.net's message of "Thu, 29 Dec 2022 18:13:20 +0000") Message-ID: <877cxp7yox.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673721309; a=rsa-sha256; cv=none; b=PDlinT8HbWp8NCryZjruJn3LOpYBIXP5WfUrFDQ9sHsMqcJuObPHR/B3wLsLDDWOYr3Xhr Qwp1t6nMR6jxdAaOk7firshbTQTsnXjUYvN4jNWTol+9THweCIxC3W2V6yXMbMw+w5rdrX 0vmvvC5c3a2plubP4ET3qDscFasnxO8Y2xNXI4UuIJFvuGswHu7bktBRdr5U09/+D4o+Ih c4E0msEvtPVpeAP4o/d7xZaTrC7Yih14KW/CCGy59dXGJNtaRY6DDLFubqP9YJT8lw8MU8 LIRnTToR/w3KeUSiEnqBE56RY9hCwzimm3ei6hIz6IbBidHTgAPK5yW6X2ypqg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=BsjzBRez; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673721309; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=SFTfqQoee9qpEyWGtHXAD/XLzDkFAkcQbvVEndvv5xw=; b=mVowB7tt+fN/TRLg5h+ErWi3gB2IkL5lO0Ebz3D8b/Qhsltdjwvt5ebu+x0Bm7X++oft8+ Qy67s+uNjYiR+KwX2/qiVo/N5cuSESe18IQ8Zxr07AxmTo8/mHt5/FkFuRygKze32YQ2xy x3pQCxhls4DXZOisjfQ9pb6lyLGLKvlAP9/2h/o9N1LB6gfYzoFhF59F0gu30T5JCA3TbI fMuua8WA6qzwUIoyMdUCiMitiUmz8nnVw+PyxSeixmZZ0bLgWB5FK4Q2UPYrb/6tfLHGBl fB6xLxhHFKeFeH9MFevowbXFvZUpB+xa6ik5AR+XjnbsHY7rN+fe2Wb/LQOfrA== X-Migadu-Spam-Score: -4.01 X-Spam-Score: -4.01 X-Migadu-Queue-Id: E707C39D75 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=BsjzBRez; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-TUID: gi64sGxA7VW7 pukkamustard skribis: > * guix/scripts/publish.scm: (bake-narinfo+nar): Compute ERIS URN of compr= essed nars. > (narinfo-string): Add #:eris-urn parameter and honor it. > * guix/scripts/narinfo.scm: ()[eris-format,eris-urn]: New fields. > (narinfo-maker): Handle ERIS URN and ERIS format. > * configure.ac: (HAVE_GUILE_ERIS): New conditional. > * gnu/packages/package-management.scm: (guix)[native-inputs]: Add guile-e= ris. I=E2=80=99d suggest separating the (guix narinfo) part from the rest. > @@ -135,8 +139,8 @@ (define (narinfo-maker str cache-url) > "Return a narinfo constructor for narinfos originating from CACHE-URL.= STR > must contain the original contents of a narinfo file." > (lambda (path urls compressions file-hashes file-sizes > - nar-hash nar-size references deriver system > - signature) > + nar-hash nar-size eris-format eris-urn references deriver > + system signature) Maybe make =E2=80=98eris-format=E2=80=99 and =E2=80=98eris-urn=E2=80=99 nam= ed parameters. > + (define (eris-encode-nar compressions) > + (and (member %eris-zstd-compression compressions) > + (let* ((nar (nar-cache-file cache item > + #:compression %eris-zstd-compressio= n)) > + (stat (stat nar #f))) > + (and stat > + (call-with-input-file nar > + (lambda (port) > + (let ((eris-urn _ > + (eris-encode port > + #:block-size 'large > + #:block-reducer rcount > + #:convergence-secret > + %null-convergence-secre= t))) > + eris-urn))))))) I think you remove the =E2=80=98let=E2=80=99 and just call =E2=80=98eris-en= code=E2=80=99 in tail position (Guile truncates multiple-value returns.) Where is =E2=80=98eris-encode=E2=80=99 storing the blocks? I don=E2=80=99t= see any parameter here. I guess it should go to /var/cache/guix/publish/eris or similar. > (let ((compression (actual-compressions item compressions))) >=20=20 > (for-each (cut compress-nar cache item <>) compressions) > @@ -640,7 +662,8 @@ (define (compressed-nar-size compression) > (match compressions > ((main others ...) > (let ((narinfo (narinfo-cache-file cache item > - #:compression main))) > + #:compression main)) > + (eris-urn (eris-encode-nar compressions))) > (with-atomic-file-output narinfo > (lambda (port) > ;; Open a new connection to the store. We cannot reuse the= main > @@ -651,7 +674,8 @@ (define (compressed-nar-size compression) > (display (narinfo-string store item > #:nar-path nar-path > #:compressions compressions > - #:file-sizes sizes) > + #:file-sizes sizes > + #:eris-urn eris-urn) Would be nice to make ERIS encoding optional, with a command-line switch to turn it on. Ludo=E2=80=99.