summaryrefslogtreecommitdiff
path: root/6e/3ec003778de64e69688899f097379d3b26044e
blob: ec5fc42434e91052c819537d09e689687077ad4b (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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
Delivery-date: Thu, 04 Jul 2024 06:22:01 -0700
Received: from mail-oa1-f60.google.com ([209.85.160.60])
	by mail.fairlystable.org with esmtps  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
	(Exim 4.94.2)
	(envelope-from <bitcoindev+bncBC3PT7FYWAMRB4ODTK2AMGQEBQBY5YY@googlegroups.com>)
	id 1sPMPQ-0001f0-Ks
	for bitcoindev@gnusha.org; Thu, 04 Jul 2024 06:22:01 -0700
Received: by mail-oa1-f60.google.com with SMTP id 586e51a60fabf-25e1d0ef6d6sf663437fac.3
        for <bitcoindev@gnusha.org>; Thu, 04 Jul 2024 06:22:00 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1720099314; cv=pass;
        d=google.com; s=arc-20160816;
        b=JlYyZ06hDex5cGAmNVSxNjOIAJCfl6Nv9Dc0vL61PGOhRmu++RP7f8ADEuJcNUhZyz
         pvSnjV5Fe+rpfxYQPOJNdfZGUDcPbk3NKk+gWqdzyp8nxCxkbaaTcYE+2HbpKrJt9PfI
         4x6C+UuPr14fU74+rvl79Q9/xw9FIrvQnwBTXYEP69W7s1sMw166+ZHBMWYLDrqTdqSd
         yHzYWJiEXek+mDRQMxNqNUenEWq++GKVnVXkAbkTCC+ajgnDKuDoaHBcY/J1wT3ltHqF
         S8stLv0MJX+dXgXsRfoydrje7NHAhA4EGHNVhSe0gYRycsJDcGHDEPP4Pzd9Hcd+DyZH
         VvsA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:cc:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:sender:dkim-signature
         :dkim-signature;
        bh=wss6yclUh0wGxCspujMl3mC6AF/1HD3IWjDHQ6ImcEs=;
        fh=fzXtaSIoq7PYYZhNjXlppYwCv1+NOESxkQZfl6Al6zw=;
        b=e0JK1pln7beURTI0rTr6Yf2284VSwCsMDuscttikjUtzrNUja2RofD2h90wF19r2vT
         BMNGmqBAz+Mt/fDpeRTi0FjoWaWSyVD6UANTxs157FQm5Eo3Z21RCCtZxYONPlAfvYbv
         u5HWlYzdZHHGz6ofZX+M2BnFvq3JWh/ZmWf+vWY3JVl5W32udYXPwEBqI0XiOjoWAo8U
         P64pCIdWC9tZVlby7s38+svVr/DwzKsW67FpIl2lYypjWaeBkYMHFrozxfNIyJCbwt9t
         Osh/FMVNdmE3q1RDztGNjHreVjw0Xulm66/fRxDVTVdsMll5RxMg3dHHnvUq2nVhPKHh
         H9kg==;
        darn=gnusha.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y9h0Q4UX;
       spf=pass (google.com: domain of antoine.riard@gmail.com designates 2607:f8b0:4864:20::d35 as permitted sender) smtp.mailfrom=antoine.riard@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlegroups.com; s=20230601; t=1720099314; x=1720704114; darn=gnusha.org;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-authentication-results
         :x-original-sender:cc:to:subject:message-id:date:from:in-reply-to
         :references:mime-version:sender:from:to:cc:subject:date:message-id
         :reply-to;
        bh=wss6yclUh0wGxCspujMl3mC6AF/1HD3IWjDHQ6ImcEs=;
        b=YbxHv80jpC5pEckL782aLmec1gHIBFiAlAE5Xr/sa6O7uXr9hZLyaRtEzGqu8LIv0G
         ICqlkP3CV34bLPf4EcoG+mOZNSVxz91jYvu3SgKUOD4MSDZkqTXa8h5d7XBdZEvs1fLa
         L8gjSbAjGi3qhZhhn4cCvGp6wYL3LmptRF2+MtS5z4EtDZvZyxvoo+/P2rW9Y/E5i3cL
         pV06zzvnwWduYEvCMq/kzTmez66iKL8gNjHEhzA1kHVTTiLidZm3+yCo4IG3886wub8/
         VbuJrDUcFCydFNo1CoMUeShQ6Y6b63L+blGv0jt19gPhDGgMnt5Xj4Lk8+cgOCoV05Qe
         eIGQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1720099314; x=1720704114; darn=gnusha.org;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-authentication-results
         :x-original-sender:cc:to:subject:message-id:date:from:in-reply-to
         :references:mime-version:from:to:cc:subject:date:message-id:reply-to;
        bh=wss6yclUh0wGxCspujMl3mC6AF/1HD3IWjDHQ6ImcEs=;
        b=kmmm5Y43NSpcZMUfqB1azxzFuTX4yC6AR09m4Uz30WNB8YJY/KAtKE8ocWLfVj+npG
         +d+6QkOJ1QgbU8YJh67jhLQuS7WEmDbi7stG+vUMvAAm8b9vtckfPDeMDqMB7tpGyJ6H
         ZzzcQMSwhov9Cpg5KIBOmaDTkeszeFkn8s36D0MJdEo5Vzb84IXEYpaOgEARoC1Dvg2b
         zVahP1KfHdc7eJI3sGP34Rqfv4/WTf1tE/UooW76oiM8N0KgqMN+W0pjD5hty57jHpbl
         FmSCz/2Di/p+nizGW1wAB/qnLnoyeo/m4lxS0PpYZsjmWyN7h96rhb+oKhkDajnRuiZm
         u7WQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1720099314; x=1720704114;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-authentication-results
         :x-original-sender:cc:to:subject:message-id:date:from:in-reply-to
         :references:mime-version:x-beenthere:x-gm-message-state:sender:from
         :to:cc:subject:date:message-id:reply-to;
        bh=wss6yclUh0wGxCspujMl3mC6AF/1HD3IWjDHQ6ImcEs=;
        b=XrmqUY7KFoKnoeFX4kK68bDgec/073dDVmZbH51OxNoAamdy3Du4Bp0GN0dBBvMMxc
         sK7XdaCdQHzqRbbC1OwtH2SrxZuk4X6Ix35L8tW93lhVdX5y+70kLoS3s/ePuRFERxsD
         5GeVFjQgYfCsWJLq5ZAy6arCsaAxqHKxIf6yRt2/xy3VCZC3oHvc3B+BC3qFx2F8+sX0
         DIu5JNefH45eIt3GmW3hKI9WAzpyMIxL3DjWnc/GDuVY+QgYpUr+pHyOSCVtLeFLTqIh
         Tr3c1MaimHzthzIZvvzzyF9xR358EmgdLkL7WHqfb5cFVPNiC/EXmmNI9UeNLDK3s6Tu
         hCuQ==
Sender: bitcoindev@googlegroups.com
X-Forwarded-Encrypted: i=2; AJvYcCX8DKJtdvv5t6/izXfNeAPSi3WIDA1HQgFGsaODWJITqZOa1YUiJwl9FJ0Em/ewzI81Y3G1veH844md8r04c+KDETKiZ+o=
X-Gm-Message-State: AOJu0YwElt4H/T7fTMf4C6saB0Na7SAoxcnDWHIzYN9cu2rrJh5TwlVH
	pBkj3k8SOPsH4Uuv7Q8XChiwlYy9wY5Wr9dc4HESy0CX0l6lzznV
X-Google-Smtp-Source: AGHT+IGGAH+C1QDlFc0putC9jl9/VKRac/com6JqIup79JgxJ+Y261qd/MvPfyKJzbYuQdfYW5mcOg==
X-Received: by 2002:a05:6871:24cd:b0:24f:cddc:ccfe with SMTP id 586e51a60fabf-25e2b59025fmr1415152fac.0.1720099314208;
        Thu, 04 Jul 2024 06:21:54 -0700 (PDT)
X-BeenThere: bitcoindev@googlegroups.com
Received: by 2002:a05:6871:708:b0:259:8c55:f25a with SMTP id
 586e51a60fabf-25e27dd6d81ls885881fac.0.-pod-prod-05-us; Thu, 04 Jul 2024
 06:21:52 -0700 (PDT)
X-Received: by 2002:a05:6871:10a:b0:254:cbaf:120b with SMTP id 586e51a60fabf-25e2b9de84cmr113048fac.1.1720099312717;
        Thu, 04 Jul 2024 06:21:52 -0700 (PDT)
Received: by 2002:aca:1c0c:0:b0:3d5:202d:f617 with SMTP id 5614622812f47-3d852bea3c1msb6e;
        Thu, 4 Jul 2024 06:21:10 -0700 (PDT)
X-Received: by 2002:a17:902:f645:b0:1f9:b681:194b with SMTP id d9443c01a7336-1fb33e4133bmr14379485ad.22.1720099269754;
        Thu, 04 Jul 2024 06:21:09 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1720099269; cv=none;
        d=google.com; s=arc-20160816;
        b=Pu95wkOm13dXIapXaueP0hdfvw1p5c7z94n3456q+HPkNLDThgzK7nOlWgHhf/IZ9a
         D5O61tDmCCJxpN1xzPPscoVKdJGZCG/VfvXJ6TpOFIYQ9HWn6H7dn19h7ezDMV8spnAv
         yTjrytIPud6Vw7E1tsXs1MWiics7Zr9ySsR5WSGcsPyk16KHM5OVksRJCfb9lGXlIKA2
         8NqwAjtjwQMvEeCwngnCUZOYFPxUj1DEyRAQciopSl40dnIFKWPEJmGZ2v12YxaqFplh
         oRk4ROD1NSfwWVxyVIRqWGDtCDC1Po5IndpsZ7ihwtpgNSi6s2eUVUsl8YoYDO6f49hk
         J27A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=cc:to:subject:message-id:date:from:in-reply-to:references
         :mime-version:dkim-signature;
        bh=Fl61C9c0fJzbBnKHiU6CfLfG9E7vpzOfvbwz/1swJrM=;
        fh=VUyRMGDsLDyKXHBc8DWjokFBiSMTvXavinKdBJZhUls=;
        b=jBZle0RaqbOHIXLVF2Gwia8mHeWE/P+XtLl4Li0z3dognXGsWj7J42KDpKfYyHUfCe
         YdbhsZpJkK+w3/mP28wQgW77MDTnnBOD3b5Tdnfm2z4gMF5bpZCVPX9OJfFNdcPiUd7Z
         tK4+g9OfMCeSzJLi3XiGXd6NtRTwvy3utTXuJcXTrKYOVa4UZsLgVKNhoEbcUYBNpXGQ
         7oN0ZyfGpgSfgs/+htbUGFZivmBowa2InaZG8MsszlZZGCqjTnYZvP+240FSuxojn2UU
         AjAVzUmvSPJIQLsMcWUHdk7hzYBth5E82DsSql1prshBy9FeWzn7p7idFVxrrsBu/Sht
         sbrQ==;
        dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y9h0Q4UX;
       spf=pass (google.com: domain of antoine.riard@gmail.com designates 2607:f8b0:4864:20::d35 as permitted sender) smtp.mailfrom=antoine.riard@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com. [2607:f8b0:4864:20::d35])
        by gmr-mx.google.com with ESMTPS id d9443c01a7336-1fafc0f2d5csi1731905ad.9.2024.07.04.06.21.09
        for <bitcoindev@googlegroups.com>
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Thu, 04 Jul 2024 06:21:09 -0700 (PDT)
Received-SPF: pass (google.com: domain of antoine.riard@gmail.com designates 2607:f8b0:4864:20::d35 as permitted sender) client-ip=2607:f8b0:4864:20::d35;
Received: by mail-io1-xd35.google.com with SMTP id ca18e2360f4ac-7eb895539e3so26214039f.2
        for <bitcoindev@googlegroups.com>; Thu, 04 Jul 2024 06:21:09 -0700 (PDT)
X-Received: by 2002:a05:6602:15:b0:7f6:6634:f382 with SMTP id
 ca18e2360f4ac-7f66dec2392mr195189539f.9.1720099268894; Thu, 04 Jul 2024
 06:21:08 -0700 (PDT)
MIME-Version: 1.0
References: <gnM89sIQ7MhDgI62JciQEGy63DassEv7YZAMhj0IEuIo0EdnafykF6RH4OqjTTHIHsIoZvC2MnTUzJI7EfET4o-UQoD-XAQRDcct994VarE=@protonmail.com>
 <72e83c31-408f-4c13-bff5-bf0789302e23n@googlegroups.com> <heKH68GFJr4Zuf6lBozPJrb-StyBJPMNvmZL0xvKFBnBGVA3fVSgTLdWc-_8igYWX8z3zCGvzflH-CsRv0QCJQcfwizNyYXlBJa_Kteb2zg=@protonmail.com>
 <5b0331a5-4e94-465d-a51d-02166e2c1937n@googlegroups.com> <yt1O1F7NiVj-WkmnYeta1fSqCYNFx8h6OiJaTBmwhmJ2MWAZkmmjPlUST6FM7t6_-2NwWKdglWh77vcnEKA8swiAnQCZJY2SSCAh4DOKt2I=@protonmail.com>
 <be78e733-6e9f-4f4e-8dc2-67b79ddbf677n@googlegroups.com> <jJLDrYTXvTgoslhl1n7Fk9-pL1mMC-0k6gtoniQINmioJpzgtqrJ_WqyFZkLltsCUusnQ4jZ6HbvRC-mGuaUlDi3kcqcFHALd10-JQl-FMY=@protonmail.com>
 <9a4c4151-36ed-425a-a535-aa2837919a04n@googlegroups.com> <3f0064f9-54bd-46a7-9d9a-c54b99aca7b2n@googlegroups.com>
 <26b7321b-cc64-44b9-bc95-a4d8feb701e5n@googlegroups.com> <CALZpt+EwVyaz1=A6hOOycqFGJs+zxyYYocZixTJgVmzZezUs9Q@mail.gmail.com>
 <607a2233-ac12-4a80-ae4a-08341b3549b3n@googlegroups.com> <3dceca4d-03a8-44f3-be64-396702247fadn@googlegroups.com>
 <301c64c7-0f0f-476a-90c4-913659477276n@googlegroups.com> <e2c61ee5-68c4-461e-a132-bb86a4c3e2ccn@googlegroups.com>
 <33dfd007-ac28-44a5-acee-cec4b381e854n@googlegroups.com>
In-Reply-To: <33dfd007-ac28-44a5-acee-cec4b381e854n@googlegroups.com>
From: Antoine Riard <antoine.riard@gmail.com>
Date: Thu, 4 Jul 2024 14:20:57 +0100
Message-ID: <CALZpt+Fs1U5f3S6_tR7AFfEMEkgBPSp3OaNEq+eqYoCSSYXD7g@mail.gmail.com>
Subject: Re: [bitcoindev] Re: Great Consensus Cleanup Revival
To: Eric Voskuil <eric@voskuil.org>
Cc: Bitcoin Development Mailing List <bitcoindev@googlegroups.com>
Content-Type: multipart/alternative; boundary="000000000000e6ad67061c6bd10c"
X-Original-Sender: antoine.riard@gmail.com
X-Original-Authentication-Results: gmr-mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20230601 header.b=Y9h0Q4UX;       spf=pass
 (google.com: domain of antoine.riard@gmail.com designates 2607:f8b0:4864:20::d35
 as permitted sender) smtp.mailfrom=antoine.riard@gmail.com;       dmarc=pass
 (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com
List-ID: <bitcoindev.googlegroups.com>
X-Google-Group-Id: 786775582512
List-Post: <https://groups.google.com/group/bitcoindev/post>, <mailto:bitcoindev@googlegroups.com>
List-Help: <https://groups.google.com/support/>, <mailto:bitcoindev+help@googlegroups.com>
List-Archive: <https://groups.google.com/group/bitcoindev
List-Subscribe: <https://groups.google.com/group/bitcoindev/subscribe>, <mailto:bitcoindev+subscribe@googlegroups.com>
List-Unsubscribe: <mailto:googlegroups-manage+786775582512+unsubscribe@googlegroups.com>,
 <https://groups.google.com/group/bitcoindev/subscribe>
X-Spam-Score: -0.5 (/)

--000000000000e6ad67061c6bd10c
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

> I assume this function lets you search for an element starting in the
middle of a single-linked list (the middle because you could call
`ft_list_find(&p-next, data_ref)` where `p` points to any element in the
> middle of the list, including possibly the last item in the list, in
which case the loop body wouldn't run). If so, I don't think this does
what's intended. This actually unlinks (and memory-leaks) elements up to >
where the match is found. I think you want to advance `start_list` this way
(I didn't test this):

Note the usage of a pointer to pointer so the correct way to call the code
is : `pointer_t * list_ptr ; list_ptr =3D first_list_element ;
ft_list_find(list_ptr, data_rf, cmp);`.
This is correct that if you point to the last item in the list, the loop
body wouldn't run (which is the expected behavior). When there is a match,
the pointer `*start_list` takes as value the memory address of the next
element in the list, the contained structure pointer is not changed. The
code has been tested a while back, though it's indeed clearer if a typedef
`pointer_t` for list is fully given:

```
typedef struct                 s_list
{
                         void     *content;
                         size_t  content_size;
                         struct  s_list. *next;
}                                      pointer_t
```

> This is why we don't use C - unsafe, unclear, unnecessary.

Actually, I think libbitcoin is using its own maintained fork of secp256k1,
which is written in C.
For sure, I wouldn't recommend using C across a whole codebase as it's not
memory-safe (euphemism) though it's still un-match if you wish to
understand low-level memory management in hot paths.
It can be easier to use C++ or Rust, though it doesn't mean it will be as
(a) perf optimal and (b) hardened against side-channels.

I have not read in detail the last Eric's email on the whole caching
identity in case of invalidity discussion, though I'll do so.

Best,
Antoine


Le jeu. 4 juil. 2024 =C3=A0 00:57, Eric Voskuil <eric@voskuil.org> a =C3=A9=
crit :

> This is why we don't use C - unsafe, unclear, unnecessary.
>
> e
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Bitcoin Development Mailing List" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/bitcoindev/CAfm7D5ppjo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> bitcoindev+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/bitcoindev/33dfd007-ac28-44a5-acee-cec4=
b381e854n%40googlegroups.com
> <https://groups.google.com/d/msgid/bitcoindev/33dfd007-ac28-44a5-acee-cec=
4b381e854n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter>
> .
>

--=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 on the web visit https://groups.google.com/d/msgid/=
bitcoindev/CALZpt%2BFs1U5f3S6_tR7AFfEMEkgBPSp3OaNEq%2BeqYoCSSYXD7g%40mail.g=
mail.com.

--000000000000e6ad67061c6bd10c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&gt; I assume this function lets you search for an element=
 starting in the middle of a single-linked list (the middle because you cou=
ld call `ft_list_find(&amp;p-next, data_ref)` where `p` points to any eleme=
nt in the<div>&gt; middle of the list, including possibly the last item in =
the list, in which case the loop body wouldn&#39;t run). If so, I don&#39;t=
 think this does what&#39;s intended. This actually unlinks (and memory-lea=
ks) elements up to &gt; where the match is found. I think you want to advan=
ce `start_list` this way (I didn&#39;t test this):<div><br></div><div>Note =
the usage of a pointer to pointer so the correct way to call the code is : =
`pointer_t * list_ptr ; list_ptr =3D first_list_element ; ft_list_find(list=
_ptr, data_rf, cmp);`.</div><div>This is correct that if you point to the l=
ast item in the list, the loop body wouldn&#39;t run (which is the expected=
 behavior). When there is a match, the pointer `*start_list` takes as value=
 the memory address of the next element in the list, the contained structur=
e pointer is not changed. The code has been tested a while back, though it&=
#39;s indeed clearer if a typedef `pointer_t` for list is fully given:=C2=
=A0</div></div><div><br></div><div>```</div><div>typedef struct =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 s_list</div><div>{</div><div>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0void =C2=A0 =C2=A0 *content;</div><div>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0si=
ze_t =C2=A0content_size;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0struct =C2=A0s_list. *n=
ext;</div><div>} =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0pointer_t</div><div>```</div><div><br></div><div>&gt; This is why we don=
&#39;t use C - unsafe, unclear, unnecessary.<br></div><div><br></div><div>A=
ctually, I think libbitcoin is using its own maintained fork of secp256k1, =
which is written in C.</div><div>For sure, I wouldn&#39;t recommend using C=
 across a whole codebase as it&#39;s not memory-safe (euphemism) though it&=
#39;s still un-match if you wish to understand low-level memory management =
in hot paths.</div><div>It can be easier to use C++ or Rust, though it does=
n&#39;t mean it will be as (a) perf optimal and (b) hardened against side-c=
hannels.</div><div><br></div><div>I have not read in detail the last Eric&#=
39;s email on the whole caching identity in case of invalidity discussion, =
though I&#39;ll do so.</div><div><br></div><div>Best,</div><div>Antoine</di=
v><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" clas=
s=3D"gmail_attr">Le=C2=A0jeu. 4 juil. 2024 =C3=A0=C2=A000:57, Eric Voskuil =
&lt;<a href=3D"mailto:eric@voskuil.org">eric@voskuil.org</a>&gt; a =C3=A9cr=
it=C2=A0:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p=
x 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color=
:rgb(204,204,204);padding-left:1ex">This is why we don&#39;t use C - unsafe=
, unclear, unnecessary.<div><br></div><div>e</div>

<p></p>

-- <br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;Bitcoin Development Mailing List&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
d/topic/bitcoindev/CAfm7D5ppjo/unsubscribe" target=3D"_blank">https://group=
s.google.com/d/topic/bitcoindev/CAfm7D5ppjo/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:bitcoindev+unsubscribe@googlegroups.com" target=3D"_blank">bitco=
indev+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/bitcoindev/33dfd007-ac28-44a5-acee-cec4b381e854n%40googlegroups.=
com?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">https://g=
roups.google.com/d/msgid/bitcoindev/33dfd007-ac28-44a5-acee-cec4b381e854n%4=
0googlegroups.com</a>.<br>
</blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;Bitcoin Development Mailing List&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:bitcoindev+unsubscribe@googlegroups.com">bitcoind=
ev+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/bitcoindev/CALZpt%2BFs1U5f3S6_tR7AFfEMEkgBPSp3OaNEq%2BeqYoCSSYXD=
7g%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.=
google.com/d/msgid/bitcoindev/CALZpt%2BFs1U5f3S6_tR7AFfEMEkgBPSp3OaNEq%2Beq=
YoCSSYXD7g%40mail.gmail.com</a>.<br />

--000000000000e6ad67061c6bd10c--