From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 16 Mar 2026 03:48:46 -0700 Received: from mail-oo1-f64.google.com ([209.85.161.64]) by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1w25V8-00050C-3w for bitcoindev@gnusha.org; Mon, 16 Mar 2026 03:48:46 -0700 Received: by mail-oo1-f64.google.com with SMTP id 006d021491bc7-67baeba7a53sf75193113eaf.0 for ; Mon, 16 Mar 2026 03:48:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1773658119; cv=pass; d=google.com; s=arc-20240605; b=HmX5kYFTlLOk96jqrqlCr5/GdeZ+/LLu2sbNOYLsWd9l50suunSCNDLwud7HbWfPdr bpehi18VUSiIyxP6M+oORTFySlE1gU+oT0t5ODK70ELPHFPqhGpVAiYbihCLUSpaJ1r0 KCWpJ8BhZ1DM/AQ3Nf0Ddq5IZu/Mousmh28+oclwTdOdNW4IF3ihLbrdfs3I5SxfK3Qh s8US+5M8n+r6uTBU31QVppiPgQRY46TXcVYwQDe3pL3zjgPURLmSvQs8mvu8idPIgusx ASyz/rXXjmKj7AJAeAJsVWg+QoT7KNLADOtUTTaiyM6/yv7XRGz1NlpS+0NTMQn+p2yR FMDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :mime-version:feedback-id:references:in-reply-to:message-id:subject :cc:from:to:date:dkim-signature; bh=JH6sdctq0juHk4RwYX9LK6qHSe94j1S63DSe+g7Gkrg=; fh=EWtpM3ulmk6LPkGcurR1DAScbjpPa9cwXptA6WMBihg=; b=BGmBLMymHrYLbRGeJuhcelIkupyW9PPCurLt87hWbSvj5f0iHbj/6D4XN6E08ruQPy 5hNUFDhL9K9xGQSUYNPbW7rhFSeKXbTW/V/XCpWhYVFMiFbeaydUd9gxjUIQHwtq3Bjp 8Rd01dBEs48hFth8udQXX8rfWK7a7AfuF9mBZIGcFryQV9Q/Ur+SnZ3okIaSWTjyJP7L AHmYrBO5Vw2mtXMj/0j0ago7ogMkzn7gzOq2nbwMLXVQlF7ky8U0jLL2n7bE7Qc0HzOY cxlLeDU3ZLZfLvV05DVNYAM8U/HMWyGCuA8kSfTc6kvkuIdq4oTMOI8a9ADzogfbdBe/ 5B3w==; darn=gnusha.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=WH0Cm338; spf=pass (google.com: domain of orenz0@protonmail.com designates 109.224.244.31 as permitted sender) smtp.mailfrom=orenz0@protonmail.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1773658119; x=1774262919; darn=gnusha.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:from:to:cc:subject :date:message-id:reply-to; bh=JH6sdctq0juHk4RwYX9LK6qHSe94j1S63DSe+g7Gkrg=; b=i1mGeEoqjU/7PQJLISjNAuuwtT2cWaqfT/ZcZhYEjp0BBRY3hYy1e3L/kSn0O9KNkx Jg3PAcu/0v6TYN6kZsctL4rz2YJwRx27SHnaJlC0kz+Llogo7JaK5F2S8e6C2S6y2hAs EXR7Aogam31UMQXwvjrSUKVf3eEAggYR6sLnMp9Andx+M0F1UJcRjOnqlOQjuqzWGgN9 Y+VRRvveHWoVO4hW0hvcAXKNcAywBhmOcBdaGDx3CxaRW8/z7h5JwUVdZo7ovNdcT2i2 li1sSzgkiZRR5M7FCPxFHkByWmqQyFbs9FWl9+Q9iqQXVy1TXtzDywgIA1OW+Jih7lPu uidQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773658119; x=1774262919; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JH6sdctq0juHk4RwYX9LK6qHSe94j1S63DSe+g7Gkrg=; b=tN9yHMg55Bc53r7eqWyTKuSGVnHR2+sf0gzFqNiHT1NmQ3O0nKKkCG2a+wOtp6fcW6 dbTEV2VYOSpiKP4edAY+iZqd8x7kEZjNCV4HNgLC1FXbuJRgNRh5xXm3SGs9gisF12ls KpsQdiOP7t6nQBVBoW5YUpuWsGU/G3uiNsBD2LjwKnZrxYgmNzs8CEdHSMyxQEMjhrDt snrwdcEzEMywiqIsRyas/C+prUyFzQRcn1Npm7NSaBLkqa70BZFazDyBsG2EA3TfitYo gMK+5x4uCgB0uQxcCMDKN60PY8XYWN3lCzY10cwH8L73LobymLnQk99BFZQgD24jS6DW gBWQ== X-Forwarded-Encrypted: i=2; AJvYcCWtxjHYv/t8LkrisI4BYNq6vw3BLmeCBE3M6XBOY/OiKfR9TrWbAkDMF6FgxU5WFstZuXb6QFMckiO7@gnusha.org X-Gm-Message-State: AOJu0Yw/+YAzmRGrLH67+lPKNIuSJ4FxLDPd18uBG9qP2nMnvTI93Jg6 puMGISDA2it1pr3cDp0zH8m7aqXWeqxIR6emtWLsu/ySLGqH9Y9DEUHR X-Received: by 2002:a05:6820:54d9:b0:67b:dc18:2c5f with SMTP id 006d021491bc7-67bdc182defmr5392651eaf.31.1773658119549; Mon, 16 Mar 2026 03:48:39 -0700 (PDT) X-BeenThere: bitcoindev@googlegroups.com; h="AV1CL+G21NlCqHV9tvTRVqH1gk0MCrY6uN4BsclccWUyLEQw8g==" Received: by 2002:a4a:d66a:0:b0:67b:b18e:c115 with SMTP id 006d021491bc7-67bc61501e5ls917195eaf.2.-pod-prod-00-us-canary; Mon, 16 Mar 2026 03:48:34 -0700 (PDT) X-Received: by 2002:a05:6808:1996:b0:467:1637:7546 with SMTP id 5614622812f47-467556e986cmr7290977b6e.15.1773658114501; Mon, 16 Mar 2026 03:48:34 -0700 (PDT) Received: by 2002:a05:620a:6406:b0:8cd:90d4:fad8 with SMTP id af79cd13be357-8cdab9eb995ms85a; Fri, 13 Mar 2026 10:26:48 -0700 (PDT) X-Received: by 2002:a05:6122:926:b0:567:4f98:fb82 with SMTP id 71dfb90a1353d-56b616366e7mr1893096e0c.7.1773422807810; Fri, 13 Mar 2026 10:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773422807; cv=none; d=google.com; s=arc-20240605; b=hUEPtbAFy5O/2ILBvoOdptj1djjOyVAelfS/pWrpTyT8aQm5kcoiC6ceoBX3nyj96z QUJ0KRhHcYI7ezWRCsr34ZI0ooaEpNGszDlE/NxGyeIm2JGKOqh2u/QVvdXQjP9K+o3h uHbgsiIyelqaScGyCDCyC1eBYJZAg3Ol/bBWebzYhliImIbOEeg+5HHS7fisMW5gDpYr IjTCjdxRfRC6nqykvoc9l+frkAebBxpwXvo+Vw4X2efq9fe7dbEpHJt0gTKbbFSih4n1 xwm2s/6I32uVA6HxS5e0oUVz5OCvnDOYUer1uD1WbtwblP0BZErXpuJhxaZil648ZReb V+Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=/qA9FYcaD5w90/0IJfWCStjQTgKJZqGxV3xWrVLI6f8=; fh=YuMn9NmkucDJ341Ag++/fDMKTswVs/zfvuiXOCyHJ7Q=; b=gs3AG2ynQD4aNmPr2kJZ6upO89Dmm3X6MlnWZy/2PDBQHRs8fZyug3g+X1tdecPTTa spbePupw1JG2YvRJN3nHNo+iTXvGOMcSeNuQmRbIFSb76MU9eH9wjOMny7YOBzLUcK/M 512pIWq9H7rn8BIbt83sEslMTnpxoKqkeGx18DV0DHnqsgJHK82GDF2On/jxrgXFfTkd BQ5u3khR/dqYt94WuZzF0vOMfZdYS/6zLVyoClrYRZmZS4UBrbF7mj7EziE7EZVqN7jO 6ps2YxB3r39crZyoQpr1wzB/WDggKl1tKLIrkrLe7S9wGtWyam6KW0EZdKm/8KZ/p8Ug L8Dw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=WH0Cm338; spf=pass (google.com: domain of orenz0@protonmail.com designates 109.224.244.31 as permitted sender) smtp.mailfrom=orenz0@protonmail.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: from mail-24431.protonmail.ch (mail-24431.protonmail.ch. [109.224.244.31]) by gmr-mx.google.com with ESMTPS id 71dfb90a1353d-56b6c245b03si34070e0c.7.2026.03.13.10.26.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2026 10:26:47 -0700 (PDT) Received-SPF: pass (google.com: domain of orenz0@protonmail.com designates 109.224.244.31 as permitted sender) client-ip=109.224.244.31; Date: Fri, 13 Mar 2026 17:26:40 +0000 To: Matt Whitlock From: "'orenz0' via Bitcoin Development Mailing List" Cc: Bitcoin Development Mailing List Subject: [bitcoindev] Re: BIP idea: Timelock-Recovery storage format Message-ID: In-Reply-To: <963e8563-1bcc-43b8-8712-aa666d5aede8@mattwhitlock.name> References: <8fefdd9e-8c71-4e11-9d90-ebbd8e25dc56n@googlegroups.com> <963e8563-1bcc-43b8-8712-aa666d5aede8@mattwhitlock.name> Feedback-ID: 57900198:user:proton X-Pm-Message-ID: ce1adda5b02955d9cd91a63442d8855e6f1cb229 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Original-Sender: orenz0@protonmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=WH0Cm338; spf=pass (google.com: domain of orenz0@protonmail.com designates 109.224.244.31 as permitted sender) smtp.mailfrom=orenz0@protonmail.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com X-Original-From: orenz0 Reply-To: orenz0 Precedence: list Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com List-ID: X-Google-Group-Id: 786775582512 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Score: -0.8 (/) > I couldn't figure out how to subscribe to the group without using my Gmai= l address, You can create a Google account with a non-gmail email - but I'm not sure a= bout privacy issues (i.e. Google may require a phone number). > Would be worth mentioning in the description of the "checksum" field that= it is to be entirely omitted during checksum calculation. That is a notewo= rthy exception to the "mandatory" constraint. Noted. I'll create a PR for that. > What's the point of doing that? Given that order is important, why wouldn= 't you just output the entries of the object sorted by their keys? Actually I checked again the Nostr protocol and it's really hashing an arra= y of the object values in a fixed key-order, without the keys themselves. H= owever, this might break if the standard has optional fields, because witho= ut the key-name you can't be sure which field the value belongs to. The Javascript implementation of this is trivial: `JSON.stringify(Object.en= tries(obj).sort())`, and so would be a Python implementation. I'm pretty sure the ECMAScript standard (https://262.ecma-international.org= /16.0/index.html#sec-json.stringify ) is very specific regarding newlines a= nd non-ascii characters. Regards, Oren Sent with Proton Mail secure email. On Friday, 13 March 2026 at 18:29, Matt Whitlock wrote: > On Friday, 13 March 2026 12:05:41 EDT, orenz0 wrote: > > Hi Matt, > > I can't find your message on https://groups.google.com/g/bitcoindev so = I'll answer directly from my email. >=20 > I couldn't figure out how to subscribe to the group without using my Gmai= l address, so when I tried to post from my bitcoin@mattwhitlock.name addres= s, the listserv rejected my post. Oh well. >=20 > >> * What should be the value of the "checksum" field during the checksum= calculation? Null? An empty string? Absent entirely? None of those options= satisfy the schema, which mandates that the value must be a string of 8 to= 64 characters. Perhaps a string of eight zeros? > > > > The checksum field should be absent entirely during checksum calculatio= n. >=20 > Would be worth mentioning in the description of the "checksum" field that= it is to be entirely omitted during checksum calculation. That is a notewo= rthy exception to the "mandatory" constraint. >=20 > >> * What is "an array of key, value pairs"? Is it [{"key":"one","value":= 1},{"key":"two","value":2}]? The example JavaScript code implies that it sh= ould be [["one",1],["two",2]], but this is not spelled out in the normative= text. Typically in a specification, example code is non-normative, and all= necessary information to implement the spec is provided in the normative t= ext. > > > > Your interpretation is correct, key-value pairs are exactly converting = an object like {"one":1,"two":2} into [["one",1],["two",2]]. >=20 > What's the point of doing that? Given that order is important, why wouldn= 't you just output the entries of the object sorted by their keys? (I think= you're going to tell me that you have no control over the order that ECMAS= cript's JSON.stringify() function outputs an object's keys, and I'm going t= o suggest not using a function whose output you can't precisely control.) >=20 > > How would you improve the description of "...by converting the top-leve= l JSON object to an array of [key, value] pairs" (in https://github.com/bit= coin/bips/blob/master/bip-0128.mediawiki#checksum-calculation )? >=20 > "...by constructing an array of arrays, where each element of the outer a= rray is an array of two elements, the first of which is the key of a proper= ty in the object and the second of which is the value of that property." >=20 > > Converting objects into key-value pairs (i.e. with the Object.entries()= function) is pretty common when the order of the keys is important - i.e. = when you need a consistent hash. For example it is used in the Nostr protoc= ol before signing event objects. >=20 > That's a very ECMAScript-centric notion. JSON is a generic structured dat= a transmission format that most high-level programming languages have adopt= ed/implemented, and not all languages have an equivalent of Object.entries(= ), and even when they do, it may not do the same thing as ECMAScript's. For= instance, jq's "to_entries" filter converts an object into an array of obj= ects: >=20 > $ jq -c 'to_entries' <<<'{"one":1,"two":2}' > [{"key":"one","value":1},{"key":"two","value":2}] >=20 > Java's Map.entrySet() method returns a Set view of a Map, in which the el= ements implement the Map.Entry interface, which exposes "key" and "value" p= roperties. >=20 > C++'s std::map::iterator dereferences to a std::pair whose "first" data m= ember holds an entry's key and whose "second" data member holds the entry's= value. >=20 > Etc., etc. The point is: the world does not revolve around ECMAScript, so= a protocol specification that incorporates by reference a particular algor= ithm from ECMAScript is under-specified for most consumers. >=20 > >> * What does "stringifying" mean? There are many ways to encode abstrac= t structured data into JSON. For instance, just look at all the possible "f= lags" that can be passed to PHP's json_encode function: https://www.php.net= /json_encode . Are non-ASCII characters to be encoded in UTF-8 or as hex es= capes? How about control characters? How are quotation marks to be escaped:= as a backslash and a quotation mark or as a Unicode hex escape? Is there a= ny optional whitespace between terminals in the encoding? If so, where, and= are the line endings LF or CR+LF? > > > > I think we should agree that "stringifying" means using Javascript's JS= ON.stringify() function with a single parameter (no "replacer" and no "spac= e" parameters). All other programming languages should follow the ECMAScrip= t specification. >=20 > Similar comments apply as above. Additionally, is the output of JSON.stri= ngify() even guaranteed to be identical across all versions and implementat= ions of ECMAScript? For instance, might some implementations choose to esca= pe newline characters as "\n" while others might write code point U+000A di= rectly into the output without escaping it? Unless ECMAScript specifies *ex= actly* what the function is to do in every case and guarantees that the spe= cification will never change, you're under-specifying how your object is su= pposed to be encoded. >=20 --=20 You received this message because you are subscribed to the Google Groups "= Bitcoin Development Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to bitcoindev+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/= T9ttcpWk8Flqa-fqSfqKAhIyFavsFtfq-CKUK9VS1i4juyLIC7mV5HGQIfthZd2rixggBPLDsNf= kvydMbQRYB5BPi4EhQNRlzIG9mnQlpI8%3D%40protonmail.com.