summaryrefslogtreecommitdiff
path: root/73/efa97171b6ccc5f97b2a8316aff96dc7191529
blob: a54c4f7b9166e55c3d467b69e05bf619a5d51ab0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
Return-Path: <pete@petertodd.org>
Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 11EBFC0032
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue,  5 Sep 2023 18:00:39 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp2.osuosl.org (Postfix) with ESMTP id CC76640153
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue,  5 Sep 2023 18:00:38 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org CC76640153
Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key,
 unprotected) header.d=messagingengine.com header.i=@messagingengine.com
 header.a=rsa-sha256 header.s=fm1 header.b=PPqCPycH
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -2.602
X-Spam-Level: 
X-Spam-Status: No, score=-2.602 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001]
 autolearn=ham autolearn_force=no
Received: from smtp2.osuosl.org ([127.0.0.1])
 by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id UXn9-YGRHGVX
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue,  5 Sep 2023 18:00:38 +0000 (UTC)
Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com
 [64.147.123.25])
 by smtp2.osuosl.org (Postfix) with ESMTPS id EB47240134
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Tue,  5 Sep 2023 18:00:37 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org EB47240134
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.west.internal (Postfix) with ESMTP id 164673200950;
 Tue,  5 Sep 2023 14:00:35 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute5.internal (MEProxy); Tue, 05 Sep 2023 14:00:35 -0400
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=1693936834; x=1694023234; bh=1/G7F3CGCc/wO
 HdCY1NHbreGkamLDkVig7JUwWFCOTE=; b=PPqCPycHKZJ1SyFyLWkLThhhUt3SG
 z9FQvE9Oj7RH8Ppwus7u4dILPVy2CpassCIoJbZthLY98sJsfFayqHUhWFiIHsz/
 7VApmUpLE2YbJv2R4P+pVgbBJV6UX0JFD5d/5OgHN4Lk2btDbHznM5RRRGIPz88i
 vPnt1k2tbhif1KRwsmktwBZhlBDo22pR4OOo9zltLr0gXfPer+C7bX9FJ/asFX6o
 zaW6dHLVPh1njdo3UMG6hV6eEjNIohCBOMkJU+5acNOSm+PpUKuDh2QisHf6IFvV
 RA4sd7ZwIGD+VfYCGlbRQOYG6XJKB0RXHb1ZHE+aqa6ALiO1nNiYima3A==
X-ME-Sender: <xms:wGz3ZAkAx00CDn6xvvZ5N0qK41e--b2F5bXqJ5ziZy_Pd3gm-MJqCw>
 <xme:wGz3ZP01BQaGmhzVFUV7t_VkZmNzQUkcroWYS7500oW-eio1hmW6AhJv-eC62JEha
 qAXE1fzCqEQAUzDUVU>
X-ME-Received: <xmr:wGz3ZOqiVWH8W7O7ATPQaRsWAGfu2tc6R4Xd2V3UAXBvYMyrwpMkfcF33Q>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehuddgleejucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgvthgv
 rhcuvfhougguuceophgvthgvsehpvghtvghrthhouggurdhorhhgqeenucggtffrrghtth
 gvrhhnpeelvdellefftddukeduffejgfefjeeuheeileeftdfgteduteeggeevueethfej
 tdenucffohhmrghinhepphgvthgvrhhtohguugdrohhrghenucevlhhushhtvghrufhiii
 gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvgesphgvthgvrhhtohguugdr
 ohhrgh
X-ME-Proxy: <xmx:wGz3ZMkFcMJipC5l_w-obtBf-cBYOtOgfYBuk7R8rdQcZg5BDQ34Aw>
 <xmx:wGz3ZO3QdE6WvTB9FzqWSKnTsNe7IFslDCl7u5XCZPEl30UFPRsrjg>
 <xmx:wGz3ZDt_1PxT3x2L2jEe-rYmMQYS0zyGXDM3l5eUNO4BYqnPpPiAJg>
 <xmx:wmz3ZBS-9OAqiauOhwNrIcDNGXvmEI2Pc8DQzCQ_dGcqg5U4fRfNcA>
Feedback-ID: i525146e8:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 5 Sep 2023 14:00:32 -0400 (EDT)
Received: by localhost (Postfix, from userid 1000)
 id 418235F82B; Tue,  5 Sep 2023 18:00:33 +0000 (UTC)
Date: Tue, 5 Sep 2023 18:00:33 +0000
From: Peter Todd <pete@petertodd.org>
To: Andrew Poelstra <apoelstra@wpsoftware.net>,
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Message-ID: <ZPdswQ7uAJr35YbC@petertodd.org>
References: <WJoM7dyrk0o8ujOZOo462r66wS2Kl3L1ZZRodvaLK-HKEUc90yvwOqXbUUrGbV1lk6cOywTqLoCyHzk2Tm3TtBFyUL0NZ6D7v9NmTXypJPA=@protonmail.com>
 <KSmH1MBTPLuXMF4TWbWq6vaft_K_7IZS2YcoZ1iHwtHY06It1DjExVgSdrLBMQZA8mLGz8xdOzyXRHAZ2qCAugwG8gMtEGsGj-XNTPN0v0w=@protonmail.com>
 <ZPHtgiJQ4Yqrr941@camus>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature"; boundary="jhBCJUTj0zdymhQa"
Content-Disposition: inline
In-Reply-To: <ZPHtgiJQ4Yqrr941@camus>
Subject: Re: [bitcoin-dev] Compressed Bitcoin Transactions
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Sep 2023 18:00:40 -0000


--jhBCJUTj0zdymhQa
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Sep 01, 2023 at 01:56:18PM +0000, Andrew Poelstra via bitcoin-dev w=
rote:
> We can swag what the space savings would be: there are 122MM utxos right
> now, which is a bit under 2^27. So assuming a uniform distribution of
> prefixes we'd need to specify 28 bits to identify a UTXO. To contrast,
> to identify a blockheight we need 20 bits and then maybe 12 more bits to
> specify a TXO within a block. Plus whatever varint overhead we have.
> (I've been working on this project but busy with family stuff and don't
> remember exactly where we landed on the varints for this. I think we
> agreed that there was room for improvement but didn't want to hold up
> posting the rest of the concept because of it.)

Since most transactions spend txouts that are similar in height to each oth=
er,
you could save further bits by specifying a reference height and then encod=
ing
the exact txout with a delta.

If you're sending multiple txins or multiple transactions in a single packe=
t,
you could achieve this by starting the packet with the reference block heig=
ht.

If your application tends to send just a single transaction, you could use a
reference height that is a function of the current time. Since sender and
receiver might not agree on the exact time, you could try slightly differen=
ce
reference heights via bruteforcing until the transaction signatures validat=
e.

--=20
https://petertodd.org 'peter'[:-1]@petertodd.org

--jhBCJUTj0zdymhQa
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE0RcYcKRzsEwFZ3N5Lly11TVRLzcFAmT3bL8ACgkQLly11TVR
LzdQGQ/8DEjgazwJ82CA5NG5djwTF1pybNs3bjowdFC8uLmUjSGeK3Mwjve9M7Pl
irN6qMKwGtgoMCbRJvUVxuqgkra7LEy8wR+Z/e36AeP9oFDq3k6gzU5UtLnnQeqM
LMLofg9f9xrf8NKo1zC/DOAQ+jAH0RYZhHBlNFRYQEo0VpViKByqhSsKaCZarpCh
H4dHMof/j1x0AIVnqvdSKR8kb0PUm22RHLIgVZVzrecJarAkO91unDvJnq+1N1tX
/AAmIaJLVjhO9q2V1i2vW+q6n9wxJYdDiwEHoMnR0QkO0qMm5XjlFCnETPiWy3Zh
WkEBcIqZgXuZlTrSzpQaizQb4FyIB+hE9lihaZ9Xz2/DxfkmqtOqh7FG8xCLRiVi
Kpx/J0ZDLm+L13c7GmQaLLonfarx6iRRIf/F30R6GuvuUepN7qZ2BEGpNg7plDMq
KTthYUoKbuBZCO4GwtoM71JOAv/Sa3915+7G5hc4Gh0YZg7TkpwAb3CPVDlMsRM+
lCfrH06Xw7yGcmD+vbiR7G8r7fN0J5PzNrXnWyButiz/RfsiYkkv0cOdbDk4ylS+
qej3V1sL4/B1GGUrtXctr8ajowVtfblhhpuqvsEKlh48FTn3Cn2pV9BE9ywlEPox
UC281gECd6piiU0Oo3AtUIGT1qmHwM6mHUw8owrcpiblMn3a/WQ=
=jT/j
-----END PGP SIGNATURE-----

--jhBCJUTj0zdymhQa--